public Merchant(Character character) { var look = character.Look.Clone(); look.AddSubLook(new SubActorLook(0, SubEntityBindingPointCategoryEnum.HOOK_POINT_CATEGORY_MERCHANT_BAG, new ActorLook { BonesID = BAG_SKIN })); m_record = new WorldMapMerchantRecord { CharacterId = character.Id, AccountId = character.Account.Id, Name = character.Name, Map = character.Map, Cell = character.Cell.Id, Direction = (int)character.Direction, EntityLook = look, IsActive = true, MerchantSince = DateTime.Now, }; Bag = new MerchantBag(this, character.MerchantBag); Position = character.Position.Clone(); }
public Merchant(WorldMapMerchantRecord record) { this.m_record = record; this.Bag = new MerchantBag(this); if (record.Map == null) { throw new System.Exception("Merchant's map not found"); } this.Position = new ObjectPosition(record.Map, record.Map.Cells[this.m_record.Cell], (DirectionsEnum)this.m_record.Direction); }
public Merchant(WorldMapMerchantRecord record) { m_record = record; Bag = new MerchantBag(this); if (record.Map == null) { throw new Exception(string.Format("Merchant's map({0}) not found", record.MapId)); } Position = new ObjectPosition( record.Map, record.Map.Cells[m_record.Cell], (DirectionsEnum)m_record.Direction); }
public void RemoveMerchantSpawn(WorldMapMerchantRecord spawn, bool lazySave = true) { if (lazySave) { ServerBase <WorldServer> .Instance.IOTaskPool.AddMessage(delegate { this.Database.Delete(spawn); }); } else { base.Database.Delete(spawn); } this.m_merchantSpawns.Remove(spawn.CharacterId); }
public Merchant(Character character) { ActorLook actorLook = character.Look.Clone(); actorLook.RemoveAuras(); actorLook.AddSubLook(new SubActorLook(0, SubEntityBindingPointCategoryEnum.HOOK_POINT_CATEGORY_MERCHANT_BAG, new ActorLook { BonesID = 237 })); this.m_record = new WorldMapMerchantRecord { CharacterId = character.Id, AccountId = character.Account.Id, Name = character.Name, Map = character.Map, Cell = (int)character.Cell.Id, Direction = (int)character.Direction, EntityLook = actorLook, IsActive = true, MerchantSince = System.DateTime.Now }; this.Bag = new MerchantBag(this, character.MerchantBag); this.Position = character.Position.Clone(); }