diff options
| author | Shauren <shauren.trinity@gmail.com> | 2013-03-15 20:09:48 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2013-03-15 20:09:48 +0100 |
| commit | e58e05d9d5da894447b81ded17c3b8fd9f4820a8 (patch) | |
| tree | e41b9ed702da6dc1063e8bddd0f270c2d47f0d7b /src/server/scripts/World | |
| parent | 51b9e6d2c947d2151af09d7a25af45ff75b0d530 (diff) | |
| parent | 11846f5990f5af421ff2fc087925245f61b4ac84 (diff) | |
Merge branch '4.3.4' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/scripts/World')
| -rw-r--r-- | src/server/scripts/World/item_scripts.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/World/npc_professions.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/World/npcs_special.cpp | 8 |
3 files changed, 13 insertions, 15 deletions
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index a6e82f31914..23b1c5e22e9 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -76,7 +76,7 @@ public: return false; // error - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, NULL); return true; } }; @@ -119,7 +119,7 @@ public: targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578)) return false; - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, NULL); return true; } }; @@ -268,15 +268,13 @@ class item_petrov_cluster_bombs : public ItemScript public: item_petrov_cluster_bombs() : ItemScript("item_petrov_cluster_bombs") { } - bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/) + bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/) { if (player->GetZoneId() != ZONE_ID_HOWLING) return false; if (!player->GetTransport() || player->GetAreaId() != AREA_ID_SHATTERED_STRAITS) { - player->SendEquipError(EQUIP_ERR_NONE, item, NULL); - if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(SPELL_PETROV_BOMB)) Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_HERE); @@ -381,7 +379,7 @@ public: } else player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL); } else - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, NULL); return true; } }; @@ -407,7 +405,7 @@ public: player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL); } else - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, NULL); return true; } }; diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 89c768d65ba..51858855cc0 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -214,7 +214,7 @@ int32 DoLowUnlearnCost(Player* player) //blacksmith void ProcessCastaction(Player* player, Creature* creature, uint32 spellId, uint32 triggeredSpellId, int32 cost) { - if (!(spellId && player->HasSpell(spellId)) && player->HasEnoughMoney(cost)) + if (!(spellId && player->HasSpell(spellId)) && player->HasEnoughMoney((int64)cost)) { player->CastSpell(player, triggeredSpellId, true); player->ModifyMoney(-cost); @@ -352,11 +352,11 @@ void ProcessUnlearnAction(Player* player, Creature* creature, uint32 spellId, ui { if (EquippedOk(player, spellId)) { - if (player->HasEnoughMoney(cost)) + if (player->HasEnoughMoney(int64(cost))) { player->CastSpell(player, spellId, true); ProfessionUnlearnSpells(player, spellId); - player->ModifyMoney(-cost); + player->ModifyMoney(-int64(cost)); if (alternativeSpellId) creature->CastSpell(player, alternativeSpellId, true); } @@ -364,7 +364,7 @@ void ProcessUnlearnAction(Player* player, Creature* creature, uint32 spellId, ui player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, creature, 0, 0); } else - player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL); + player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, NULL, NULL); player->CLOSE_GOSSIP_MENU(); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 3ddb42532b8..43dbe778d6d 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1297,7 +1297,7 @@ public: case GOSSIP_OPTION_LEARNDUALSPEC: if (player->GetSpecsCount() == 1 && !(player->getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))) { - if (!player->HasEnoughMoney(10000000)) + if (!player->HasEnoughMoney(uint64(10000000))) { player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, 0, 0, 0); player->PlayerTalkClass->SendCloseGossip(); @@ -1305,7 +1305,7 @@ public: } else { - player->ModifyMoney(-10000000); + player->ModifyMoney(int64(-10000000)); // Cast spells that teach dual spec // Both are also ImplicitTarget self and must be cast by player @@ -2560,11 +2560,11 @@ public: } if (doSwitch) { - if (!player->HasEnoughMoney(EXP_COST)) + if (!player->HasEnoughMoney(uint64(EXP_COST))) player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, 0, 0, 0); else if (noXPGain) { - player->ModifyMoney(-EXP_COST); + player->ModifyMoney(-int64(EXP_COST)); player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN); } else if (!noXPGain) |
