Core/Pets: merged funjoker's new Pet Slot system
* fixed packets and handling for stable master * fixed Control Pet / Demon handling * corrected wrong trainer spell for the Control spells * Added base support for Assist behaivior * corrected action bar layout * Hunter Pets will now have the same level as their tamer (patch 4.1 change) * corrected health stats for pets
This commit is contained in:
1 parent
b2945a5c58
commit
b7c15093a6
32 files changed
+803
-685
No files matched your search
@@ -1452,7 +1452,7 @@ public:
|
||||
// caster have pet now
|
||||
player->SetMinion(pet, true);
|
||||
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
pet->SavePetToDB(PET_SAVE_NEW_PET);
|
||||
player->PetSpellInitialize();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel());
|
||||
|
||||
player->SetMinion(pet, true);
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
pet->SavePetToDB(PET_SAVE_NEW_PET);
|
||||
player->PetSpellInitialize();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -555,6 +555,11 @@ class spell_siamat_wailing_winds : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_siamat_wailing_winds_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WAILING_WINDS_DAMAGE });
|
||||
}
|
||||
|
||||
void OnPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
|
||||
@@ -2580,7 +2580,7 @@ class spell_gen_pet_summoned : public SpellScriptLoader
|
||||
{
|
||||
PetType newPetType = (player->getClass() == CLASS_HUNTER) ? HUNTER_PET : SUMMON_PET;
|
||||
Pet* newPet = new Pet(player, newPetType);
|
||||
if (newPet->LoadPetFromDB(player, 0, player->GetLastPetNumber(), true))
|
||||
if (newPet->LoadPetData(player, 0, player->GetLastPetNumber(), true))
|
||||
{
|
||||
// revive the pet if it is dead
|
||||
if (newPet->getDeathState() == DEAD)
|
||||
@@ -3105,7 +3105,7 @@ class spell_gen_summon_elemental : public SpellScriptLoader
|
||||
if (GetCaster())
|
||||
if (Unit* owner = GetCaster()->GetOwner())
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER) /// @todo this check is maybe wrong
|
||||
owner->ToPlayer()->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
|
||||
owner->ToPlayer()->RemovePet(nullptr, PET_SAVE_DISMISS, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -3693,10 +3693,10 @@ class spell_gen_gm_freeze : public SpellScriptLoader
|
||||
{
|
||||
if (Pet* pet = player->GetPet())
|
||||
{
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
pet->SavePetToDB(PET_SAVE_CURRENT_STATE);
|
||||
// not let dismiss dead pet
|
||||
if (pet->IsAlive())
|
||||
player->RemovePet(pet, PET_SAVE_NOT_IN_SLOT);
|
||||
player->RemovePet(pet, PET_SAVE_DISMISS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1129,6 +1129,9 @@ class spell_hun_tame_beast : public SpellScriptLoader
|
||||
if (!GetExplTargetUnit())
|
||||
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
|
||||
|
||||
if (!caster->ToPlayer()->GetFirstUnusedActivePetSlot())
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
|
||||
if (Creature* target = GetExplTargetUnit()->ToCreature())
|
||||
{
|
||||
if (target->getLevel() > caster->getLevel())
|
||||
|
||||
@@ -51,11 +51,6 @@ enum WarlockPetCalculate
|
||||
SPELL_WARLOCK_PET_SCALING_03 = 34957,
|
||||
SPELL_WARLOCK_PET_SCALING_04 = 34958,
|
||||
SPELL_WARLOCK_PET_SCALING_05 = 61013,
|
||||
ENTRY_FELGUARD = 17252,
|
||||
ENTRY_VOIDWALKER = 1860,
|
||||
ENTRY_FELHUNTER = 417,
|
||||
ENTRY_SUCCUBUS = 1863,
|
||||
ENTRY_IMP = 416,
|
||||
SPELL_WARLOCK_GLYPH_OF_VOIDWALKER = 56247,
|
||||
};
|
||||
|
||||
|
||||
@@ -2565,6 +2565,8 @@ class npc_stable_master : public CreatureScript
|
||||
|
||||
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
{
|
||||
player->GetSession()->SendStablePet(me->GetGUID());
|
||||
|
||||
SmartAI::GossipSelect(player, menuId, gossipListId);
|
||||
if (menuId != STABLE_MASTER_GOSSIP_SUB_MENU)
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user