Skip to content

Commit

Permalink
[c13069] Cleanup a few recent commits based on comments
Browse files Browse the repository at this point in the history
(based on commit [12856] - 9a238fd)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
  • Loading branch information
DomGries authored and xfurry committed Jul 8, 2015
1 parent 73ad2df commit b942a78
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
9 changes: 3 additions & 6 deletions src/game/Pet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2003,12 +2003,9 @@ void Pet::CastOwnerTalentAuras()
if (pOwner && pOwner->getClass() == CLASS_HUNTER)
{
// clear any existing Ferocious Inspiration auras
if (HasAura(75593))
RemoveAurasDueToSpell(75593);
if (HasAura(75446))
RemoveAurasDueToSpell(75446);
if (HasAura(75447))
RemoveAurasDueToSpell(75447);
RemoveAurasDueToSpell(75593);
RemoveAurasDueToSpell(75446);
RemoveAurasDueToSpell(75447);

if (isAlive())
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5569,7 +5569,7 @@ bool Player::UpdateSkill(uint32 skill_id, uint32 step)
return false;

SkillStatusData &skillStatus = itr->second;
if (itr == mSkillStatus.end() || skillStatus.uState == SKILL_DELETED)
if (skillStatus.uState == SKILL_DELETED)
return false;

uint16 field = skillStatus.pos / 2;
Expand Down
12 changes: 6 additions & 6 deletions src/game/ScriptMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1495,12 +1495,12 @@ bool ScriptAction::HandleScriptStep()

// Select Spell
uint32 spell = m_script->castSpell.spellId;
uint32 i = 0;
while (i < MAX_TEXT_ID && m_script->textId[i]) // Count which dataint fields are filled
++i;
if (i > 0)
if (uint32 rnd = urand(0, i)) // Random selection resulted in one of the dataint fields
spell = m_script->textId[rnd - 1];
uint32 filledCount = 0;
while (filledCount < MAX_TEXT_ID && m_script->textId[filledCount]) // Count which dataint fields are filled
++filledCount;
if (filledCount > 0)
if (uint32 randomField = urand(0, filledCount)) // Random selection resulted in one of the dataint fields
spell = m_script->textId[randomField - 1];

// TODO: when GO cast implemented, code below must be updated accordingly to also allow GO spell cast
if (pSource && pSource->GetTypeId() == TYPEID_GAMEOBJECT)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "13068"
#define REVISION_NR "13069"
#endif // __REVISION_NR_H__

0 comments on commit b942a78

Please sign in to comment.