@@ -9269,6 +9269,12 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
|
|||||||
loot->FillLoot(creature->GetCreatureTemplate()->SkinLootId, LootTemplates_Skinning, this, true);
|
loot->FillLoot(creature->GetCreatureTemplate()->SkinLootId, LootTemplates_Skinning, this, true);
|
||||||
permission = OWNER_PERMISSION;
|
permission = OWNER_PERMISSION;
|
||||||
|
|
||||||
|
//Inform instance if creature is skinned.
|
||||||
|
if (InstanceScript* mapInstance = creature->GetInstanceScript())
|
||||||
|
{
|
||||||
|
mapInstance->CreatureLooted(creature, LOOT_SKINNING);
|
||||||
|
}
|
||||||
|
|
||||||
// Xinef: Set new loot recipient
|
// Xinef: Set new loot recipient
|
||||||
creature->SetLootRecipient(this, false);
|
creature->SetLootRecipient(this, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ class InstanceScript : public ZoneScript
|
|||||||
//On load
|
//On load
|
||||||
virtual void Load(char const* data) { LoadBossState(data); }
|
virtual void Load(char const* data) { LoadBossState(data); }
|
||||||
|
|
||||||
|
//Called when creature is Looted
|
||||||
|
virtual void CreatureLooted(Creature* /*creature*/, LootType) {}
|
||||||
|
|
||||||
//When save is needed, this function generates the data
|
//When save is needed, this function generates the data
|
||||||
virtual std::string GetSaveData() { return GetBossSaveData(); }
|
virtual std::string GetSaveData() { return GetBossSaveData(); }
|
||||||
|
|
||||||
|
|||||||
@@ -110,4 +110,9 @@ enum GameObjectsIds
|
|||||||
GO_UROK_PILE = 175621,
|
GO_UROK_PILE = 175621,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum npcspells
|
||||||
|
{
|
||||||
|
SPELL_FINKLE_IS_EINHORN = 16710
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+13
@@ -67,6 +67,19 @@ public:
|
|||||||
memset(go_emberseerrunes, 0, sizeof(go_emberseerrunes));
|
memset(go_emberseerrunes, 0, sizeof(go_emberseerrunes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreatureLooted(Creature* creature, LootType loot) override
|
||||||
|
{
|
||||||
|
switch (creature->GetEntry())
|
||||||
|
{
|
||||||
|
case NPC_THE_BEAST:
|
||||||
|
if (loot == LOOT_SKINNING)
|
||||||
|
{
|
||||||
|
creature->CastSpell(creature, SPELL_FINKLE_IS_EINHORN, true);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnCreatureCreate(Creature* creature)
|
void OnCreatureCreate(Creature* creature)
|
||||||
{
|
{
|
||||||
switch (creature->GetEntry())
|
switch (creature->GetEntry())
|
||||||
|
|||||||
Reference in New Issue
Block a user