fix(Core\Scripts):Venomhide Hatchling multiple fixes (#8792)
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635420472205770200');
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_venomhide_hatchling' WHERE `entry`=34320;
|
||||||
@@ -2459,6 +2459,83 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum VenomhideHatchlingMisc
|
||||||
|
{
|
||||||
|
ITEM_VENOMHIDE_BABY_TOOTH = 47196,
|
||||||
|
|
||||||
|
MODEL_BABY_RAPTOR = 29251,
|
||||||
|
MODEL_BABY_RAPTOR_REPTILE_EYES = 29809,
|
||||||
|
MODEL_ADOLESCENT_RAPTOR = 29103,
|
||||||
|
MODEL_FULL_RAPTOR = 5291,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum VenomhideHatchlingTexts
|
||||||
|
{
|
||||||
|
TALK_EMOTE_EAT = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum VenomhideHatchlingSpellEmotes
|
||||||
|
{
|
||||||
|
SPELL_SILITHID_MEAT = 65258,
|
||||||
|
SPELL_SILITHID_EGG = 65265,
|
||||||
|
SPELL_FRESH_DINOSAUR_MEAT = 65200,
|
||||||
|
};
|
||||||
|
|
||||||
|
class npc_venomhide_hatchling : public CreatureScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_venomhide_hatchling() : CreatureScript("npc_venomhide_hatchling") {}
|
||||||
|
|
||||||
|
struct npc_venomhide_hatchlingAI : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_venomhide_hatchlingAI(Creature* creature) : ScriptedAI(creature) {}
|
||||||
|
|
||||||
|
void IsSummonedBy(Unit* summoner) override
|
||||||
|
{
|
||||||
|
if (summoner->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (summoner->ToPlayer()->GetItemCount(ITEM_VENOMHIDE_BABY_TOOTH) >= 6)
|
||||||
|
{
|
||||||
|
me->SetDisplayId(MODEL_BABY_RAPTOR_REPTILE_EYES);
|
||||||
|
}
|
||||||
|
if (summoner->ToPlayer()->GetItemCount(ITEM_VENOMHIDE_BABY_TOOTH) >= 11)
|
||||||
|
{
|
||||||
|
me->SetDisplayId(MODEL_ADOLESCENT_RAPTOR);
|
||||||
|
}
|
||||||
|
if (summoner->ToPlayer()->GetItemCount(ITEM_VENOMHIDE_BABY_TOOTH) >= 16)
|
||||||
|
{
|
||||||
|
me->SetDisplayId(MODEL_FULL_RAPTOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||||
|
{
|
||||||
|
if (spell->Id == SPELL_SILITHID_EGG || spell->Id == SPELL_SILITHID_MEAT || spell->Id == SPELL_FRESH_DINOSAUR_MEAT)
|
||||||
|
{
|
||||||
|
Talk(TALK_EMOTE_EAT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool OnGossipHello(Player* player, Creature* creature) override
|
||||||
|
{
|
||||||
|
if (creature->GetOwnerGUID() && creature->GetOwnerGUID() == player->GetGUID())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
|
{
|
||||||
|
return new npc_venomhide_hatchlingAI(creature);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_npcs_special()
|
void AddSC_npcs_special()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -2466,6 +2543,7 @@ void AddSC_npcs_special()
|
|||||||
new npc_riggle_bassbait();
|
new npc_riggle_bassbait();
|
||||||
new npc_target_dummy();
|
new npc_target_dummy();
|
||||||
new npc_training_dummy();
|
new npc_training_dummy();
|
||||||
|
new npc_venomhide_hatchling();
|
||||||
|
|
||||||
// Theirs
|
// Theirs
|
||||||
new npc_air_force_bots();
|
new npc_air_force_bots();
|
||||||
|
|||||||
Reference in New Issue
Block a user