fix(Scripts/Quest): Use Correct Summon Spells for Webbed Creature in Bloodmyst Isle (#26838)

This commit is contained in:
Gultask
2026-07-28 13:20:38 -03:00
committed by GitHub
parent 08b78d84da
commit d990c02891
2 changed files with 28 additions and 28 deletions

View File

@@ -23,12 +23,13 @@
## npc_webbed_creature
######*/
//possible creatures to be spawned
uint32 const possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17353, 17336, 17550, 17330, 17701, 17321, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327};
enum WebbedCreature
{
NPC_EXPEDITION_RESEARCHER = 17681
SPELL_FREE_WEBBED_CREATURE_HOSTILE_START = 30954,
SPELL_FREE_WEBBED_CREATURE_HOSTILE_END = 30963,
SPELL_FREE_WEBBED_CREATURE_RESEARCHER = 31010,
NPC_EXPEDITION_RESEARCHER = 17681
};
class npc_webbed_creature : public CreatureScript
@@ -44,39 +45,20 @@ public:
void JustEngagedWith(Unit* /*who*/) override { }
void JustDied(Unit* killer) override
void JustDied(Unit* /*killer*/) override
{
uint32 spawnCreatureID = 0;
switch (urand(0, 2))
{
case 0:
if (Player* player = killer->ToPlayer())
{
player->KilledMonsterCredit(NPC_EXPEDITION_RESEARCHER);
}
else if (killer->IsPet())
{
if (Unit* owner = killer->GetOwner())
{
if (owner->IsPlayer())
{
owner->ToPlayer()->KilledMonsterCredit(NPC_EXPEDITION_RESEARCHER);
}
}
}
spawnCreatureID = NPC_EXPEDITION_RESEARCHER;
me->CastSpell(me, SPELL_FREE_WEBBED_CREATURE_RESEARCHER, true);
if (Player* player = me->GetLootRecipient())
player->RewardPlayerAndGroupAtEvent(NPC_EXPEDITION_RESEARCHER, player);
break;
case 1:
case 2:
spawnCreatureID = possibleSpawns[urand(0, 30)];
me->CastSpell(me, urand(SPELL_FREE_WEBBED_CREATURE_HOSTILE_START, SPELL_FREE_WEBBED_CREATURE_HOSTILE_END), true);
break;
}
if (spawnCreatureID)
{
me->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
}
}
};