コード例 #1
0
 public static void HandleSpellUpgrade(SpellUpgradeRequestMessage message, WorldClient client)
 {
     if (client.Character.IsFighting)
     {
         client.Character.Reply("Vous ne pouvez pas effectuer cette action en combat.");
         return;
     }
     else
     {
         client.Character.BoostSpell(message.spellId, message.spellLevel);
     }
 }
コード例 #2
0
        public static void HandleSpellUpgradeRequestMessage(Client client, SpellUpgradeRequestMessage message)
        {
            CharacterSpellRecord spellRecord = client.Character.Spells.FirstOrDefault(spell => spell.SpellId == message.spellId);

            if (spellRecord != null && client.Character.SpellsPoints > 0)
            {
                client.Character.SpellsPoints--;
                client.Send(new SpellUpgradeSuccessMessage(spellRecord.SpellId, spellRecord.Level++));
                CharacterHandler.SendCharacterStatsListMessage(client);
                InventoryHandler.SendSpellListMessage(client);
            }
            else
            {
                client.Send(new SpellUpgradeFailureMessage());
            }
        }
コード例 #3
0
 public static void HandleSpellUpgradeRequestMessage(WorldClient client, SpellUpgradeRequestMessage message)
 {
     client.Character.Spells.BoostSpell((int)message.spellId, message.spellLevel);
     client.Character.RefreshStats();
 }