aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-07-24 15:27:42 +0100
committerNay <dnpd.dd@gmail.com>2012-07-24 15:27:42 +0100
commit0f04b2fc36593526cf1cc86667d37779691e1135 (patch)
tree7945001bf56ba7194e3846153613f9af95822e95 /src/server/scripts/World
parent4364f80d37560ba50ef01bdcea147e1d7cba0067 (diff)
Core/Misc: Update money to 64 bits (from 32), increasing the maximum gold possible
This got a bit messy and will be further fixed when all related packets are updated. (Also fixed a typo in atoll msvc macro)
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/npc_professions.cpp6
-rw-r--r--src/server/scripts/World/npcs_special.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 2afa80dd42c..a55fe2c7ffa 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -209,7 +209,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);
@@ -347,11 +347,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);
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 57a65423b6f..04b74122955 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1287,7 +1287,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(UI64LIT(10000000)))
{
player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, 0, 0, 0);
player->PlayerTalkClass->SendCloseGossip();
@@ -1295,7 +1295,7 @@ public:
}
else
{
- player->ModifyMoney(-10000000);
+ player->ModifyMoney(SI64LIT(-10000000));
// Cast spells that teach dual spec
// Both are also ImplicitTarget self and must be cast by player
@@ -2600,11 +2600,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)