Core: Some optimizations
- Declare some functions const - Fix some mem leak - Fix some resource leak - Remove unused variables and functions - Remove duplicate functions - Reduce the scope of some variables - Remove unused file --HG-- branch : trunk
This commit is contained in:
@@ -1351,8 +1351,6 @@ bool Pet::addSpell(uint32 spell_id,ActiveStates active /*= ACT_DECIDE*/, PetSpel
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 oldspell_id = 0;
|
||||
|
||||
PetSpell newspell;
|
||||
newspell.state = state;
|
||||
newspell.type = type;
|
||||
@@ -1402,7 +1400,6 @@ bool Pet::addSpell(uint32 spell_id,ActiveStates active /*= ACT_DECIDE*/, PetSpel
|
||||
if (newspell.active == ACT_ENABLED)
|
||||
ToggleAutocast(itr2->first, false);
|
||||
|
||||
oldspell_id = itr2->first;
|
||||
unlearnSpell(itr2->first,false,false);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user