*[8508] Not assign boolean value to integer variable, expecting to always be 0. Also renaming member variables. Author: NoFantasy

*[8516] Implement spell 53271. Author: Shendor
*[8519] Use RuneType enum where appropriate and more explicit data for rune init. Author: VladimirMangos
Thanks to: Stryker
*[8520] Limit telent 49182 and ranks triggering expected:wq runes cooldown case. Author: Shendor
*Fix Herald Volazj wrongly targeting himself on Shadow Bolt Volley instead of randomly targeting on Shiver, by tlexii.

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-21 12:31:36 -07:00
parent f093c18ca1
commit 9e5c8db01f
9 changed files with 75 additions and 28 deletions
+22 -4
View File
@@ -20861,7 +20861,7 @@ void Player::UpdateCharmedAI()
}
}
void Player::ConvertRune(uint8 index, uint8 newType)
void Player::ConvertRune(uint8 index, RuneType newType)
{
SetCurrentRune(index, newType);
@@ -20889,6 +20889,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)
@@ -20901,9 +20910,9 @@ 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
SetRuneCooldown(i, 0); // reset cooldowns
SetBaseRune(i, runeSlotTypes[i]); // init base types
SetCurrentRune(i, runeSlotTypes[i]); // init current types
SetRuneCooldown(i, 0); // reset cooldowns
m_runes->SetRuneState(i);
}
@@ -20911,6 +20920,15 @@ void Player::InitRunes()
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f);
}
bool Player::IsBaseRuneSlotsOnCooldown(RuneType runeType) const
{
for(uint32 i = 0; i < MAX_RUNES; ++i)
if (GetBaseRune(i) == runeType && GetRuneCooldown(i) == 0)
return false;
return true;
}
void Player::AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store, bool broadcast)
{
Loot loot;