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(); }
public EnterWorld(Toon toon) : base(ID) { this.Toon = (Toon)toon; }
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); }
private void handleEnterWorld(EnterWorld enterWorld) { //So we need to hold all data received till SceneController is loaded and ready for data. PlayerToon = enterWorld.Toon; }
private void handleMoveRequest(Toon p, MoveRequest syncClient) { Logger.Log(p.Name + " Moved to " + syncClient.Location); p.Location.Set(syncClient.Location); SendMovementUpdate(syncClient, p.Serial); }
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); }
internal void EnterWorld(ProtoShared.Data.Toon toon) { Toon = toon; transform.position = Helpers.Helper.getVector(toon.Location); }
public ShowOtherToon(Toon toon) : base(ID) { this.Toon = (Toon)toon; }