Exemplo n.º 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();
        }
Exemplo n.º 2
0
 public EnterWorld(Toon toon)
     : base(ID)
 {
     this.Toon = (Toon)toon;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 7
0
 internal void EnterWorld(ProtoShared.Data.Toon toon)
 {
     Toon = toon;
     transform.position = Helpers.Helper.getVector(toon.Location);
 }
Exemplo n.º 8
0
 public ShowOtherToon(Toon toon)
     : base(ID)
 {
     this.Toon = (Toon)toon;
 }