[Feature] Change Mana Costs to use Signed Int (#2384)

This commit is contained in:
Aeadoin
2022-08-21 15:38:21 -04:00
committed by GitHub
parent b108828502
commit 1d8dc4c8a8
6 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -2713,7 +2713,7 @@ int32 Merc::GetActSpellCost(uint16 spell_id, int32 cost)
// Formula = Unknown exact, based off a random percent chance up to mana cost(after focuses) of the cast spell
if(itembonuses.Clairvoyance && spells[spell_id].classes[(GetClass()%17) - 1] >= GetLevel() - 5)
{
int16 mana_back = itembonuses.Clairvoyance * zone->random.Int(1, 100) / 100;
int mana_back = itembonuses.Clairvoyance * zone->random.Int(1, 100) / 100;
// Doesnt generate mana, so best case is a free spell
if(mana_back > cost)
mana_back = cost;