hel whit subclass 5375

06/07/2011 05:08 rockymiperro#1
good I have a problem with sub classes when I take a class I get everything right but when I disconnect and re-entered the helper class is disappearing
look at this first photo appear with Level 1 sub class

[Only registered and activated users can see links. Click Here To Register...]

and in this second picture off me and went back inside and I have no sub class need help please

[Only registered and activated users can see links. Click Here To Register...]

this is my database of subclass what i need?

PHP Code:
using System;
using Conquer_Online_Server.Game;

namespace 
Conquer_Online_Server.Database
{
    public class 
SubClassTable
    
{
        public static 
void Load(Entity Entity)
        {
            
MySqlCommand Command = new MySqlCommand(MySqlCommandType.SELECT);
            
Command.Select("subclasses").Where("id"Entity.UID);
            
MySqlReader Reader = new MySqlReader(Command);
            while (
Reader.Read())
            {
                
Statement.SubClass Sub = new Statement.SubClass();
                
Sub.ID Reader.ReadByte("uid");
                
Sub.Level Reader.ReadByte("level");
                
Sub.Phase Reader.ReadByte("phase");
                
Entity.SubClasses.Class(Sub.IDSub);
            }
        }

        public static 
bool Contains(Entity Entitybyte id)
        {
            
bool Return = false;
            
MySqlCommand Command = new MySqlCommand(MySqlCommandType.SELECT);
            
Command.Select("subclasses").Where("id"Entity.UID).And("uid"id);
            
MySqlReader Reader = new MySqlReader(Command);
            if (
Reader.Read())
            {
                if (
Reader.ReadByte("uid") == id)
                if (
Reader.ReadByte("level") == id)
                if (
Reader.ReadByte("phase") == id)
                    Return = 
true;
            }

            return Return;
        }

        public static 
void Insert(Entity Entitybyte id)
        {
            
MySqlCommand Command = new MySqlCommand(MySqlCommandType.INSERT);
            
Command.Insert("subclasses")
                .
Insert("uid"id)
                .
Insert("id"Entity.UID)
                .
Execute();
        }

        public static 
void Update(Entity EntityStatement.SubClass SubClass)
        {
            
MySqlCommand Command = new MySqlCommand(MySqlCommandType.UPDATE);
            
Command.Update("subclasses")
                .
Set("phase"SubClass.Phase)
                .
Set("level"SubClass.Level)
                .
Where("id"Entity.UID)
                .And(
"uid"SubClass.ID)
                .
Execute();
        }

        public static 
void Update(Entity Entity)
        {
            
MySqlCommand Command = new MySqlCommand(MySqlCommandType.UPDATE);
            
Command.Update("entities")
                .
Set("StudyPoints"Entity.SubClasses.StudyPoints)
                .
Where("UID"Entity.UID)
                .
Execute();
        }
    }
           

its for versio 5375
06/07/2011 07:14 thesamuraivega#2
Learn C# and do it yourself. super lol!!!
06/07/2011 07:25 marlyandedsel#3
Check your loading and saving of your Entity or your SubClassTable be sure that after you get subclass entity will save and when you log on back besure to load it back your subclass

it goes like this:
Flor Loading
Quote:
Public static void LoadEntity................
{
existing code here
.
.
client.Entity.Subclass = r.ReadUInt32("SubClass"),
client.Entity.Subclasslevel = r.ReadUInt32("Subclasslevel)
r.close();
SubClassTable.Load(client.Entity);
for saving..... You Figure that out how to save....



something like that... dont jus't copy and paste that, be sure to figure it out okay...
06/09/2011 07:15 rockymiperro#4
please chek my database of subclass and tell me what i need?
06/09/2011 10:08 rockymiperro#5
fixed close this ;D
06/10/2011 23:47 |xabi|#6
Can you tell me The Slove of thi pro