diff options
| author | megamage <none@none> | 2009-05-27 17:02:39 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-27 17:02:39 -0500 |
| commit | 514fc49c3c5c8c0a1e1194c7817af1dade1b4aa7 (patch) | |
| tree | 030a2ca3ce1a019b91f140f406024fa0a4da8ff9 /src/game/Player.cpp | |
| parent | 7ccd99ecab40b939464487bcba707167c9da9d7e (diff) | |
[7901] Refactoting pet action bar related code. Fixed some related bugs. Author: VladimirMangos
* Correctly update action bar at loading and other cases when listed unlearned/not existed spells
* Avoid send data by PetSpellInitialize() many times while pet loading
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 7f0a7e78c54..111b4e1bd48 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16798,10 +16798,7 @@ void Player::PetSpellInitialize() data << uint8(pet->GetReactState()) << uint8(charmInfo->GetCommandState()) << uint16(0); // action bar loop - for(uint32 i = 0; i < MAX_SPELL_CONTROL_BAR; ++i) - { - data << uint32(charmInfo->GetActionBarEntry(i)->Raw); - } + charmInfo->BuildActionBar(&data); size_t spellsCountPos = data.wpos(); @@ -16878,8 +16875,7 @@ void Player::PossessSpellInitialize() data << uint32(0); //action bar 40 - for(uint32 i = 0; i < 10; i++) - data << uint16(charmInfo->GetActionBarEntry(i)->SpellOrAction) << uint16(charmInfo->GetActionBarEntry(i)->Type); + charmInfo->BuildActionBar(&data); //40 //addlist 1 data << uint8(0); @@ -16969,10 +16965,7 @@ void Player::CharmSpellInitialize() data << uint16(0); //action bar 40 - for(uint32 i = 0; i < MAX_SPELL_CONTROL_BAR; ++i) //40 - { - data << uint16(charmInfo->GetActionBarEntry(i)->SpellOrAction) << uint16(charmInfo->GetActionBarEntry(i)->Type); - } + charmInfo->BuildActionBar(&data); //40 //add list data << uint8(addlist); //1 |
