mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8519] Use RuneType enum where appropriate and more explicit data for rune init.
This commit is contained in:
parent
e4ed2ce29c
commit
1c59403b39
6 changed files with 24 additions and 15 deletions
|
|
@ -19599,7 +19599,7 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost)
|
|||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Player::ConvertRune(uint8 index, uint8 newType)
|
||||
void Player::ConvertRune(uint8 index, RuneType newType)
|
||||
{
|
||||
SetCurrentRune(index, newType);
|
||||
|
||||
|
|
@ -19627,6 +19627,15 @@ void Player::AddRunePower(uint8 index)
|
|||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
static RuneType runeSlotTypes[MAX_RUNES] = {
|
||||
/*0*/ RUNE_BLOOD,
|
||||
/*1*/ RUNE_BLOOD,
|
||||
/*2*/ RUNE_UNHOLY,
|
||||
/*3*/ RUNE_UNHOLY,
|
||||
/*4*/ RUNE_FROST,
|
||||
/*5*/ RUNE_FROST
|
||||
};
|
||||
|
||||
void Player::InitRunes()
|
||||
{
|
||||
if(getClass() != CLASS_DEATH_KNIGHT)
|
||||
|
|
@ -19638,8 +19647,8 @@ void Player::InitRunes()
|
|||
|
||||
for(uint32 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
SetBaseRune(i, i / 2); // init base types
|
||||
SetCurrentRune(i, i / 2); // init current types
|
||||
SetBaseRune(i, runeSlotTypes[i]); // init base types
|
||||
SetCurrentRune(i, runeSlotTypes[i]); // init current types
|
||||
SetRuneCooldown(i, 0); // reset cooldowns
|
||||
m_runes->SetRuneState(i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue