mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge commit 'origin/master' into 310
Hope it works with live 3.1.2.9901 client
This commit is contained in:
commit
ebb03b7b9f
32 changed files with 1709 additions and 2123 deletions
|
|
@ -5949,7 +5949,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
CastSpell(this, spell, true, castItem, triggeredByAura);
|
||||
CastSpell(target, spell, true, castItem, triggeredByAura);
|
||||
if ((*itr)->DropAuraCharge())
|
||||
RemoveAurasDueToSpell((*itr)->GetId());
|
||||
return true;
|
||||
|
|
@ -10403,20 +10403,30 @@ void CharmInfo::InitCharmCreateSpells()
|
|||
|
||||
bool CharmInfo::AddSpellToAB(uint32 oldid, uint32 newid, ActiveStates newstate)
|
||||
{
|
||||
// new spell already listed for example in case prepered switch to lesser rank in Pet::removeSpell
|
||||
for(uint8 i = 0; i < 10; ++i)
|
||||
if (PetActionBar[i].Type == ACT_DISABLED || PetActionBar[i].Type == ACT_ENABLED || PetActionBar[i].Type == ACT_PASSIVE)
|
||||
if (newid && PetActionBar[i].SpellOrAction == newid)
|
||||
return true;
|
||||
|
||||
// old spell can be leasted for example in case learn high rank
|
||||
for(uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
if((PetActionBar[i].Type == ACT_DISABLED || PetActionBar[i].Type == ACT_ENABLED || PetActionBar[i].Type == ACT_PASSIVE) && PetActionBar[i].SpellOrAction == oldid)
|
||||
if (PetActionBar[i].Type == ACT_DISABLED || PetActionBar[i].Type == ACT_ENABLED || PetActionBar[i].Type == ACT_PASSIVE)
|
||||
{
|
||||
PetActionBar[i].SpellOrAction = newid;
|
||||
if(!oldid)
|
||||
if (PetActionBar[i].SpellOrAction == oldid)
|
||||
{
|
||||
if(newstate == ACT_DECIDE)
|
||||
PetActionBar[i].Type = ACT_DISABLED;
|
||||
else
|
||||
PetActionBar[i].Type = newstate;
|
||||
}
|
||||
PetActionBar[i].SpellOrAction = newid;
|
||||
if (!oldid)
|
||||
{
|
||||
if (newstate == ACT_DECIDE)
|
||||
PetActionBar[i].Type = ACT_DISABLED;
|
||||
else
|
||||
PetActionBar[i].Type = newstate;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -11406,6 +11416,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
|
|||
// this enables pet details window (Shift+P)
|
||||
pet->AIM_Initialize();
|
||||
pet->InitPetCreateSpells();
|
||||
pet->InitLevelupSpellsForLevel();
|
||||
pet->InitTalentForLevel();
|
||||
pet->SetHealth(pet->GetMaxHealth());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue