示例#1
0
        internal static Toon CreateToon(Account p, ProtoShared.Packets.FromClient.CreateCharacter createCharacter)
        {
            if (_characters == null) _characters = new AccountDBDataSetTableAdapters.charactersTableAdapter();
            Toon toon = new Toon();
            toon.SceneSerial = 1;
            toon.Name = createCharacter.Name;
            toon.Location = new Vector3D(905, 13, 593);
            toon.Attributes.Add(new Attrib() { ID = AttribType.Health, Value = 50 });
            toon.Attributes.Add(new Attrib() { ID = AttribType.MaxHealth, Value = 50 });
            _characters.Insert(p.Serial, toon.Name, toon.GetData());

            LoadToonsForAccountID(p);
            return p.Toons.Where(t => t.Name.Equals(createCharacter.Name)).First();
        }
示例#2
0
 public EnterWorld(Toon toon)
     : base(ID)
 {
     this.Toon = (Toon)toon;
 }
示例#3
0
 internal static void SaveToon(Toon toon)
 {
     if (_characters == null) _characters = new AccountDBDataSetTableAdapters.charactersTableAdapter();
     Logger.Log("Saved Toon " + toon.Name);
     _characters.UpdateToon(toon.Name, toon.GetData(), toon.Serial);
 }
示例#4
0
 private void handleEnterWorld(EnterWorld enterWorld)
 {
     //So we need to hold all data received till SceneController is loaded and ready for data.
     PlayerToon = enterWorld.Toon;
 }
示例#5
0
 private void handleMoveRequest(Toon p, MoveRequest syncClient)
 {
     Logger.Log(p.Name + " Moved to " + syncClient.Location);
     p.Location.Set(syncClient.Location);
     SendMovementUpdate(syncClient, p.Serial);
 }
示例#6
0
 internal void EnterWorld(Toon enterWorld)
 {
     Logger.Log(enterWorld.Name + ": Toon entering world. setting location" + enterWorld.Location.ToString());
     this.Toon = enterWorld;
     transform.position = Helpers.Helper.getVector(enterWorld.Location);
 }
示例#7
0
 internal void EnterWorld(ProtoShared.Data.Toon toon)
 {
     Toon = toon;
     transform.position = Helpers.Helper.getVector(toon.Location);
 }
示例#8
0
 public ShowOtherToon(Toon toon)
     : base(ID)
 {
     this.Toon = (Toon)toon;
 }