mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Small fix
This commit is contained in:
parent
59fb246652
commit
54c1585cdf
3 changed files with 17 additions and 16 deletions
|
|
@ -18896,11 +18896,11 @@ void Player::InitRunes()
|
||||||
|
|
||||||
for(uint32 i = 0; i < MAX_RUNES; ++i)
|
for(uint32 i = 0; i < MAX_RUNES; ++i)
|
||||||
{
|
{
|
||||||
SetBaseRune(i, i / 2);
|
SetBaseRune(i, i / 2); // init base types
|
||||||
SetCurrentRune(i, i / 2);
|
SetCurrentRune(i, i / 2); // init current types
|
||||||
SetRuneCooldown(i, 0);
|
SetRuneCooldown(i, 0); // reset cooldowns
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uint32 i = 0; i < NUM_RUNES; ++i)
|
for(uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
|
||||||
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f);
|
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -225,6 +225,7 @@ struct Areas
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_RUNES 6
|
#define MAX_RUNES 6
|
||||||
|
#define RUNE_COOLDOWN 5 // 5*2=10 sec
|
||||||
|
|
||||||
enum RuneType
|
enum RuneType
|
||||||
{
|
{
|
||||||
|
|
@ -232,7 +233,7 @@ enum RuneType
|
||||||
RUNE_FROST = 1,
|
RUNE_FROST = 1,
|
||||||
RUNE_UNHOLY = 2,
|
RUNE_UNHOLY = 2,
|
||||||
RUNE_DEATH = 3,
|
RUNE_DEATH = 3,
|
||||||
NUM_RUNES = 4
|
NUM_RUNE_TYPES = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RuneInfo
|
struct RuneInfo
|
||||||
|
|
|
||||||
|
|
@ -3157,7 +3157,7 @@ uint8 Spell::CheckRuneCost(uint32 runeCostID)
|
||||||
if(src->NoRuneCost())
|
if(src->NoRuneCost())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
int32 runeCost[NUM_RUNES]; // blood, frost, unholy, death
|
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
|
||||||
|
|
||||||
for(uint32 i = 0; i < RUNE_DEATH; ++i)
|
for(uint32 i = 0; i < RUNE_DEATH; ++i)
|
||||||
runeCost[i] = src->RuneCost[i];
|
runeCost[i] = src->RuneCost[i];
|
||||||
|
|
@ -3193,7 +3193,7 @@ void Spell::TakeRunePower()
|
||||||
if(!src || (src->NoRuneCost() && src->NoRunicPowerGain()))
|
if(!src || (src->NoRuneCost() && src->NoRunicPowerGain()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int32 runeCost[NUM_RUNES]; // blood, frost, unholy, death
|
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
|
||||||
|
|
||||||
for(uint32 i = 0; i < RUNE_DEATH; ++i)
|
for(uint32 i = 0; i < RUNE_DEATH; ++i)
|
||||||
runeCost[i] = src->RuneCost[i];
|
runeCost[i] = src->RuneCost[i];
|
||||||
|
|
@ -3207,7 +3207,7 @@ void Spell::TakeRunePower()
|
||||||
uint8 rune = plr->GetCurrentRune(i);
|
uint8 rune = plr->GetCurrentRune(i);
|
||||||
if(runeCost[rune] > 0)
|
if(runeCost[rune] > 0)
|
||||||
{
|
{
|
||||||
plr->SetRuneCooldown(i, 5); // 5*2=10 sec
|
plr->SetRuneCooldown(i, RUNE_COOLDOWN); // 5*2=10 sec
|
||||||
runeCost[rune]--;
|
runeCost[rune]--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3221,7 +3221,7 @@ void Spell::TakeRunePower()
|
||||||
{
|
{
|
||||||
if(!plr->GetRuneCooldown(i) && plr->GetCurrentRune(i) == RUNE_DEATH)
|
if(!plr->GetRuneCooldown(i) && plr->GetCurrentRune(i) == RUNE_DEATH)
|
||||||
{
|
{
|
||||||
plr->SetRuneCooldown(i, 5); // 5*2=10 sec
|
plr->SetRuneCooldown(i, RUNE_COOLDOWN); // 5*2=10 sec
|
||||||
runeCost[plr->GetCurrentRune(i)]--;
|
runeCost[plr->GetCurrentRune(i)]--;
|
||||||
uint8 base = plr->GetBaseRune(i);
|
uint8 base = plr->GetBaseRune(i);
|
||||||
plr->SetCurrentRune(i, base);
|
plr->SetCurrentRune(i, base);
|
||||||
|
|
@ -3232,10 +3232,10 @@ void Spell::TakeRunePower()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// you can gain some runic power when use runes
|
||||||
float rp = src->runePowerGain;;
|
float rp = src->runePowerGain;;
|
||||||
rp *= sWorld.getRate(RATE_POWER_RUNICPOWER_INCOME);
|
rp *= sWorld.getRate(RATE_POWER_RUNICPOWER_INCOME);
|
||||||
rp += plr->GetPower(POWER_RUNIC_POWER);
|
plr->ModifyPower(POWER_RUNIC_POWER, (int32)rp)
|
||||||
plr->SetPower(POWER_RUNIC_POWER, (uint32)rp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::TakeReagents()
|
void Spell::TakeReagents()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue