public static void HandleAuthenticationTicketMessage(GameClient client, AuthenticationTicketMessage message) { if (message.ticket != string.Empty) { AccountRecord account = AccountRecord.ReturnAccountWithTicket(message.ticket); if (account != null) { client.Account = account; if (GameServer.Clients.Count(x => x.Account.Login == account.Login) > 1) { GameServer.Clients.First(x => x.Account.Login == account.Login).Disconnect(); } client.Account.Characters = CharacterRecord.ReturnCharacters(account.Id); client.Send(new AuthenticationTicketAcceptedMessage()); BasicHandler.SendBasicTimeMessage(client); } else { client.Send(new AuthenticationTicketRefusedMessage()); } } else { client.Send(new AuthenticationTicketRefusedMessage()); } }
void OnCharacterLogIn(Character character) { Friend friend; if (m_friends.TryGetValue(character.Client.WorldAccount.Id, out friend)) { friend.SetOnline(character); OnFriendOnline(friend); if (WarnOnConnection) { // %1 ({player,%2,%3}) est en ligne. BasicHandler.SendTextInformationMessage(Owner.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 143, character.Client.WorldAccount.Nickname, character.Name); } } Ignored ignored; if (m_ignoreds.TryGetValue(character.Client.WorldAccount.Id, out ignored)) { ignored.SetOnline(character); OnIgnoredOnline(ignored); } }
public void SetBoss(GuildMember guildMember) { if (guildMember.Guild != this) { return; } if (Boss != null) { if (Boss == guildMember) { return; } var oldBoss = Boss; oldBoss.RankId = 2; oldBoss.Rights = GuildRightsBitEnum.GUILD_RIGHT_MANAGE_RIGHTS; // <b>%1</b> a remplacé <b>%2</b> au poste de meneur de la guilde <b>%3</b> BasicHandler.SendTextInformationMessage(m_clients, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 199, guildMember.Name, oldBoss.Name, Name); UpdateMember(oldBoss); } guildMember.RankId = 1; guildMember.Rights = GuildRightsBitEnum.GUILD_RIGHT_BOSS; UpdateMember(guildMember); }
public bool SellItem(int guid, int amount) { if (!CanSell || amount <= 0) { Character.Client.Send(new ExchangeErrorMessage((int)ExchangeErrorEnum.SELL_ERROR)); return(false); } var item = Character.Inventory.TryGetItem(guid); if (item == null) { Character.Client.Send(new ExchangeErrorMessage((int)ExchangeErrorEnum.SELL_ERROR)); return(false); } if (item.Stack < amount) { Character.Client.Send(new ExchangeErrorMessage((int)ExchangeErrorEnum.SELL_ERROR)); return(false); } var price = (int)Math.Ceiling(item.Template.Price / 10) * amount; BasicHandler.SendTextInformationMessage(Character.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 22, amount, item.Template.Id); Character.Inventory.RemoveItem(item, amount); Character.Inventory.AddKamas(price); Character.Client.Send(new ExchangeSellOkMessage()); return(true); }
public static void RemoveShowFromWatchList(string title, string year, string tvdbid) { TraktShowSync syncObject = BasicHandler.CreateShowSyncData(title, year, tvdbid); if (syncObject == null) { return; } Thread syncThread = new Thread(delegate(object obj) { TraktResponse response = TraktAPI.TraktAPI.SyncShowWatchList((obj as TraktShowSync), TraktSyncModes.unwatchlist); if (response == null || response.Status != "success") { return; } GUI.GUIWatchListShows.ClearCache(TraktSettings.Username); }) { IsBackground = true, Name = "RemoveWatchList" }; syncThread.Start(syncObject); }
public bool BuyItem(int itemGuid, uint quantity) { MerchantItem merchantItem = this.Merchant.Bag.FirstOrDefault((MerchantItem x) => x.Guid == itemGuid); bool result; if (merchantItem == null || quantity == 0u || !this.CanBuy(merchantItem, quantity)) { this.Character.Client.Send(new ExchangeErrorMessage(8)); result = false; } else { this.Merchant.Bag.RemoveItem(merchantItem, quantity, true); BasePlayerItem item = Singleton <ItemManager> .Instance.CreatePlayerItem(this.Character, merchantItem.Template, quantity, merchantItem.Effects); this.Character.Inventory.AddItem(item); BasicHandler.SendTextInformationMessage(this.Character.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 21, new object[] { quantity, merchantItem.Template.Id }); this.Character.Inventory.SubKamas((int)(merchantItem.Price * quantity)); BasicHandler.SendTextInformationMessage(this.Character.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 46, new object[] { (int)(merchantItem.Price * quantity) }); this.Merchant.KamasEarned += merchantItem.Price * quantity; this.Character.Client.Send(new ExchangeBuyOkMessage()); result = true; } return(result); }
public bool CanUseItem(BasePlayerItem item, bool send = true) { if (!HasItem(item.Guid) || !item.IsUsable()) { return(false); } if (Owner.IsInExchange() || (Owner.IsInFight() && Owner.Fight.State != FightState.Placement)) { return(false); } if (Owner.IsGhost()) { return(false); } if (!item.AreConditionFilled(Owner)) { if (send) { BasicHandler.SendTextInformationMessage(Owner.Client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 19); } return(false); } return(true); }
public override bool Apply() { Spell spell = new Spell((int)base.Dice.DiceNum, (byte)base.Dice.DiceFace); bool result; if (spell.Template == null || !spell.ByLevel.ContainsKey((int)base.Dice.DiceFace)) { this.logger.Error <short, short, int>("Cannot find trap spell id = {0}, level = {1}. Casted Spell = {2}", base.Dice.DiceNum, base.Dice.DiceFace, base.Spell.Id); result = false; } else { if (base.Fight.GetTriggers(base.TargetedCell).Length > 0) { if (base.Caster is CharacterFighter) { BasicHandler.SendTextInformationMessage((base.Caster as CharacterFighter).Character.Client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 229); } result = false; } else { Trap trigger = (base.EffectZone.ShapeType == SpellShapeEnum.Q) ? new Trap((short)base.Fight.PopNextTriggerId(), base.Caster, base.Spell, base.TargetedCell, base.Dice, spell, GameActionMarkCellsTypeEnum.CELLS_CROSS, (byte)this.Effect.ZoneSize) : new Trap((short)base.Fight.PopNextTriggerId(), base.Caster, base.Spell, base.TargetedCell, base.Dice, spell, (byte)this.Effect.ZoneSize); base.Fight.AddTrigger(trigger); result = true; } } return(result); }
private static void OnCharacterCreationSuccess(WorldClient client) { CharacterHandler.SendCharacterCreationResultMessage(client, CharacterCreationResultEnum.OK); BasicHandler.SendBasicNoOperationMessage(client); CharacterHandler.SendCharactersListMessage(client); }
public void SetBoss(GuildMember guildMember) { lock (this.m_lock) { if (guildMember.Guild == this) { if (this.Boss != guildMember) { if (this.Boss != null) { this.Boss.RankId = 0; this.Boss.Rights = GuildRightsBitEnum.GUILD_RIGHT_NONE; if (this.m_members.Count > 1) { BasicHandler.SendTextInformationMessage(this.m_clients, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 199, new string[] { guildMember.Name, this.Boss.Name, this.Name }); } this.UpdateMember(this.Boss); } this.Boss = guildMember; this.Boss.RankId = 1; this.Boss.Rights = GuildRightsBitEnum.GUILD_RIGHT_BOSS; this.UpdateMember(this.Boss); } } } }
protected override bool InternalApply() { var integerEffect = Effect.GenerateEffect(EffectGenerationContext.Item) as EffectInteger; if (integerEffect == null) { return(false); } if (Target.Stats.Health.DamageTaken == 0) { // health already to max BasicHandler.SendTextInformationMessage(Target.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 225); return(false); } var heal = (int)(integerEffect.Value * NumberOfUses); if (Target.Stats.Health.DamageTaken < heal) { heal = Target.Stats.Health.DamageTaken; } UsedItems = (uint)Math.Ceiling((double)heal / integerEffect.Value); Target.Stats.Health.DamageTaken -= heal; // x hp restored Target.RefreshStats(); BasicHandler.SendTextInformationMessage(Target.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 1, heal); Target.PlayEmote(EmotesEnum.EMOTE_MANGER, true); return(true); }
protected override bool InternalApply() { var integerEffect = Effect.GenerateEffect(EffectGenerationContext.Item) as EffectInteger; if (integerEffect == null) { return(false); } if (Target.Energy == Target.EnergyMax) { // energy already to max BasicHandler.SendTextInformationMessage(Target.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 253); return(false); } var energy = (int)(integerEffect.Value * NumberOfUses); if ((Target.EnergyMax - Target.Energy) < energy) { energy = Target.EnergyMax - Target.Energy; } UsedItems = (uint)Math.Ceiling((double)energy / integerEffect.Value); Target.Energy += (short)energy; // x energy restored Target.RefreshStats(); BasicHandler.SendTextInformationMessage(Target.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 92, energy); Target.PlayEmote(EmotesEnum.EMOTE_BOIRE_UNE_POTION, true); return(true); }
void OnFightDenied(ArenaWaitingCharacter obj) { ArenaManager.Instance.ArenaTaskPool.ExecuteInContext(() => { ContextHandler.SendGameRolePlayArenaFighterStatusMessage(m_clients, Id, obj.Character, false); obj.Character.ToggleArenaWaitTime(); // %1 a refusé le combat en Kolizéum. BasicHandler.SendTextInformationMessage(Clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 275, obj.Character.Name); if (obj.Character.ArenaParty != null) { foreach (var character in obj.Team.Members.ToArray()) { obj.Team.RemoveCharacter(character); // Combat de Kolizéum annulé/non validé par votre équipe character.Character.SendInformationMessage(TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 273); } obj.Character.ArenaParty.RemoveMember(obj.Character); } else { obj.Team.RemoveCharacter(obj); } var opposedTeam = obj.Team == DefendersTeam ? ChallengersTeam : DefendersTeam; foreach (var character in opposedTeam.Members) { // Combat de Kolizéum annulé/non validé par l'autre équipe. character.Character.SendInformationMessage(TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 274); } foreach (var character in DefendersTeam.Members.Concat(ChallengersTeam.Members).Where(character => character.Character.ArenaPopup != null)) { character.Character.ArenaPopup.Cancel(); } foreach (var character in obj.Team.Members.Where(character => character.Character.ArenaParty == null)) { ArenaManager.Instance.AddToQueue(character.Character); } var once = false; foreach (var character in opposedTeam.Members) { if (character.Character.ArenaParty == null) { ArenaManager.Instance.AddToQueue(character.Character); } else if (!once) { ArenaManager.Instance.AddToQueue(character.Character.ArenaParty); once = true; } } }); }
public static void HandleMapRunningFightDetailsRequestMessage(WorldClient client, MapRunningFightDetailsRequestMessage message) { Fight fight = Singleton <FightManager> .Instance.GetFight(message.fightId); if (fight != null && !(fight.Map != client.Character.Map)) { ContextRoleplayHandler.SendMapRunningFightDetailsMessage(client, fight); BasicHandler.SendBasicNoOperationMessage(client); } }
public override void Execute(TriggerBase trigger) { Map map = ((GameTrigger)trigger).Character.Map; string arg = map.ToggleMute() ? "La map est maintenant réduite au silence !" : "La map n'est plus réduite au silence !"; BasicHandler.SendTextInformationMessage(map.Clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 0, new string[] { string.Format("<font color=\"#{0}\">{1}</font>", Color.Red.ToArgb().ToString("X"), arg) }); }
private void OnMemberConnected(GuildMember member) { BasicHandler.SendTextInformationMessage(this.m_clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 224, new string[] { member.Character.Name }); this.m_clients.Add(member.Character.Client); this.UpdateMember(member); this.m_clients.Send(new GuildMemberOnlineStatusMessage((uint)member.Id, true)); }
internal RabbitMQDefaultChannel(RabbitMQProtocol protocol, ushort id, Action <ushort> closeCallback) : base(protocol) { _channelId = id; _protocol = protocol; _isOpen = false; _managerCloseCallback = closeCallback; _exchangeMethodHandler = new ExchangeHandler(_channelId, _protocol); _queueMethodHandler = new QueueHandler(_channelId, _protocol); _basicHandler = new BasicHandler(_channelId, _protocol); }
protected virtual void OnLevelChanged() { ExperienceLevelFloor = ExperienceManager.Instance.GetGuildLevelExperience(Level); ExperienceNextLevelFloor = ExperienceManager.Instance.GetGuildNextLevelExperience(Level); //Votre guilde passe niveau %1 BasicHandler.SendTextInformationMessage(m_clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 208, Level); m_clients.Send(new GuildLevelUpMessage(Level)); }
protected virtual void OnLevelChanged() { this.ExperienceLevelFloor = Singleton <ExperienceManager> .Instance.GetGuildLevelExperience(this.Level); this.ExperienceNextLevelFloor = Singleton <ExperienceManager> .Instance.GetGuildNextLevelExperience(this.Level); BasicHandler.SendTextInformationMessage(this.m_clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 208, new object[] { this.Level }); this.m_clients.Send(new GuildLevelUpMessage(this.Level)); }
void OnMemberConnected(GuildMember member) { //Un membre de votre guilde, {player,%1,%2}, est en ligne. BasicHandler.SendTextInformationMessage(m_clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 224, member.Character.Name); m_clients.Add(member.Character.Client); UpdateMember(member); m_clients.Send(new GuildMemberOnlineStatusMessage(member.Id, true)); }
private void OnItemMoved(BasePlayerItem item, CharacterInventoryPositionEnum lastPosition) { m_itemsByPosition[lastPosition].Remove(item); m_itemsByPosition[item.Position].Add(item); var wasEquiped = lastPosition != CharacterInventoryPositionEnum.INVENTORY_POSITION_NOT_EQUIPED; var isEquiped = item.IsEquiped(); if (wasEquiped && !isEquiped || !wasEquiped && isEquiped) { ApplyItemEffects(item, false); } if (!item.OnEquipItem(wasEquiped)) { return; } if (item.Template.ItemSet != null && !(wasEquiped && isEquiped)) { var count = CountItemSetEquiped(item.Template.ItemSet); if (count >= 0) { ApplyItemSetEffects(item.Template.ItemSet, count + (wasEquiped ? 1 : -1), false); } if (count > 0) { ApplyItemSetEffects(item.Template.ItemSet, count, true, false); } InventoryHandler.SendSetUpdateMessage(Owner.Client, item.Template.ItemSet); } if (lastPosition == CharacterInventoryPositionEnum.INVENTORY_POSITION_NOT_EQUIPED && !item.AreConditionFilled(Owner)) { BasicHandler.SendTextInformationMessage(Owner.Client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 19); MoveItem(item, lastPosition); } InventoryHandler.SendObjectMovementMessage(Owner.Client, item); InventoryHandler.SendInventoryWeightMessage(Owner.Client); if (isEquiped || wasEquiped) { CheckItemsCriterias(); } Owner.UpdateLook(item); Owner.RefreshStats(); }
public void SendLoginMessage() { BasicHandler.SendTextInformationMessage(Client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 89, new string[0]); if (Client.Account.LastConnection.HasValue && !string.IsNullOrEmpty(Client.Account.LastIp)) { BasicHandler.SendTextInformationMessage(Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 152, new string[] { $"{Client.Account.LastConnection.Value.Year}", $"{Client.Account.LastConnection.Value.Month}", $"{Client.Account.LastConnection.Value.Day}", $"{Client.Account.LastConnection.Value.Hour}", $"{Client.Account.LastConnection.Value.Minute}", Client.Account.LastIp }); } BasicHandler.SendTextInformationMessage(Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 153, new string[] { Client.Ip }); Client.Account.LastConnection = DateTime.Now; Client.Account.LastIp = Client.Ip; LastUsage = DateTime.Now; BasicHandler.SendTextInformationMessage(Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 0, new string[] { "Welcome to Past" }); }
private static void OnAccountReceived(AccountAnswerMessage message, WorldClient client) { lock (ApproachHandler.ConnectionQueue.SyncRoot) { ApproachHandler.ConnectionQueue.Remove(client); } if (client.QueueShowed) { ApproachHandler.SendQueueStatusMessage(client, 0, 0); } AccountData account = message.Account; if (account == null) { client.Send(new AuthenticationTicketRefusedMessage()); client.DisconnectLater(1000); } else { WorldAccount worldAccount = Singleton <AccountManager> .Instance.FindById(account.Id); if (worldAccount != null) { client.WorldAccount = worldAccount; if (client.WorldAccount.ConnectedCharacter.HasValue) { Character character = Singleton <World> .Instance.GetCharacter(client.WorldAccount.ConnectedCharacter.Value); if (character != null) { character.LogOut(); } } } client.SetCurrentAccount(account); client.Send(new AuthenticationTicketAcceptedMessage()); BasicHandler.SendBasicTimeMessage(client); ApproachHandler.SendServerOptionalFeaturesMessage(client, new sbyte[1] { 7 }); ApproachHandler.SendAccountCapabilitiesMessage(client); client.Send(new TrustStatusMessage(true, false)); if (client.UserGroup.Role >= RoleEnum.Moderator) { ApproachHandler.SendConsoleCommandsListMessage(client); } } }
public static void HandleChatClientPrivateMessage(GameClient client, ChatClientPrivateMessage message) { GameClient targetClient = GameServer.Clients.FirstOrDefault(target => target.Character.Name == message.receiver); if (targetClient != null && targetClient != client) { client.Send(new ChatServerCopyMessage(9, message.content, Functions.ReturnUnixTimeStamp(DateTime.Now), "", targetClient.Character.Id, targetClient.Character.Name)); SendChatServerMessage(targetClient, 9, message.content, client.Character.Id, client.Character.Name); } else { BasicHandler.SendTextInformationMessage(client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 211, new string[0]); } }
public override bool CanApply() { if (Fight.GetTriggers(TargetedCell).Length <= 0) { return(base.CanApply()); } if (Caster is CharacterFighter) { BasicHandler.SendTextInformationMessage(((CharacterFighter)Caster).Character.Client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 229); } return(false); }
public static void HandleCharacterDeletionRequestMessage(WorldClient client, CharacterDeletionRequestMessage message) { if (!IPCAccessor.Instance.IsConnected) { client.Send(new CharacterDeletionErrorMessage(1)); client.DisconnectLater(1000); } else { CharacterRecord characterRecord = client.Characters.Find((CharacterRecord entry) => entry.Id == message.characterId); if (characterRecord == null) { client.Send(new CharacterDeletionErrorMessage(1)); client.DisconnectLater(1000); } else { Stump.Server.WorldServer.Game.Guilds.GuildMember guildMember = Singleton <GuildManager> .Instance.TryGetGuildMember(characterRecord.Id); if (guildMember != null && guildMember.IsBoss) { client.Send(new CharacterDeletionErrorMessage(1)); client.DisconnectLater(1000); } else { string secretAnswerHash = message.secretAnswerHash; if (Singleton <ExperienceManager> .Instance.GetCharacterLevel(characterRecord.Experience) <= 20 || (client.Account.SecretAnswer != null && secretAnswerHash == (message.characterId + "~" + client.Account.SecretAnswer).GetMD5())) { if (client.Account.DeletedCharactersCount > CharacterHandler.MaxDayCharacterDeletion) { client.Send(new CharacterDeletionErrorMessage(2)); } else { Singleton <CharacterManager> .Instance.DeleteCharacterOnAccount(characterRecord, client); CharacterHandler.SendCharactersListMessage(client); BasicHandler.SendBasicNoOperationMessage(client); } } else { client.Send(new CharacterDeletionErrorMessage(3)); } } } } }
public void UpdateStatus(ChallengeStatusEnum status, FightActor from = null) { if (Status != ChallengeStatusEnum.RUNNING) { return; } Status = status; ContextHandler.SendChallengeResultMessage(Fight.Clients, this); if (Status == ChallengeStatusEnum.FAILED && @from is CharacterFighter) { BasicHandler.SendTextInformationMessage(Fight.Clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 188, ((CharacterFighter)from).Name, Id); } }
public virtual bool BuyItem(int itemId, uint amount) { NpcItem npcItem = this.Items.FirstOrDefault((NpcItem entry) => entry.Item.Id == itemId); bool result; if (npcItem == null) { this.Character.Client.Send(new ExchangeErrorMessage(8)); result = false; } else { uint num = (uint)(npcItem.Price * amount); if (!this.CanBuy(npcItem, amount)) { this.Character.Client.Send(new ExchangeErrorMessage(8)); result = false; } else { BasicHandler.SendTextInformationMessage(this.Character.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 21, new object[] { amount, itemId }); BasePlayerItem item = Singleton <ItemManager> .Instance.CreatePlayerItem(this.Character, itemId, amount, this.MaxStats || npcItem.MaxStats); this.Character.Inventory.AddItem(item); if (this.Token != null) { this.Character.Inventory.UnStackItem(this.Character.Inventory.TryGetItem(this.Token), num); } else { this.Character.Inventory.SubKamas((int)num); BasicHandler.SendTextInformationMessage(this.Character.Client, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 46, new object[] { num }); } this.Character.Client.Send(new ExchangeBuyOkMessage()); result = true; } } return(result); }
private void OnItemMoved(BasePlayerItem item, CharacterInventoryPositionEnum lastPosition) { this.m_itemsByPosition[lastPosition].Remove(item); this.m_itemsByPosition[item.Position].Add(item); bool flag = lastPosition != CharacterInventoryPositionEnum.INVENTORY_POSITION_NOT_EQUIPED; bool flag2 = item.IsEquiped(); if ((flag && !flag2) || (!flag && flag2)) { this.ApplyItemEffects(item, false); } if (item.OnEquipItem(flag)) { if (item.Template.ItemSet != null && (!flag || !flag2)) { int num = this.CountItemSetEquiped(item.Template.ItemSet); if (num >= 0) { this.ApplyItemSetEffects(item.Template.ItemSet, num + (flag ? 1 : -1), false, true); } if (num > 0) { this.ApplyItemSetEffects(item.Template.ItemSet, num, true, false); } InventoryHandler.SendSetUpdateMessage(this.Owner.Client, item.Template.ItemSet); } if (lastPosition == CharacterInventoryPositionEnum.INVENTORY_POSITION_NOT_EQUIPED && !item.AreConditionFilled(this.Owner)) { BasicHandler.SendTextInformationMessage(this.Owner.Client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 19); this.MoveItem(item, lastPosition); } InventoryHandler.SendObjectMovementMessage(this.Owner.Client, item); InventoryHandler.SendInventoryWeightMessage(this.Owner.Client); if (lastPosition != CharacterInventoryPositionEnum.INVENTORY_POSITION_NOT_EQUIPED) { this.CheckItemsCriterias(); } if ((flag2 || flag) && item.AppearanceId != 0u) { this.Owner.UpdateLook(true); } this.Owner.RefreshActor(); this.Owner.RefreshStats(); } }
public override bool OnEquipItem(bool unequip) { if (unequip) { return(base.OnEquipItem(true)); } if (!(Owner.Fight is ArenaFight)) { return(true); } Owner.Inventory.MoveItem(this, CharacterInventoryPositionEnum.INVENTORY_POSITION_NOT_EQUIPED); //Vous ne pouvez pas équiper cet objet dans un combat de Kolizéum. BasicHandler.SendTextInformationMessage(Owner.Client, TextInformationTypeEnum.TEXT_INFORMATION_ERROR, 298); return(false); }