Skip to content

Commit

Permalink
Fix quests 4512 & 4513
Browse files Browse the repository at this point in the history
Q4512 : https://classic.wowhead.com/quest=4512/a-little-slime-goes-a-long-way
Q4513 : https://classic.wowhead.com/quest=4513/a-little-slime-goes-a-long-way

This core fix also needs the latests DB updates :
mangostwo/database@705cf99
mangostwo/database@dc6dfb7

Now the mobs will disappear after item use. Th eplayer will no more be able to reuse the item on the same dead mob.
The empty flasks will also be usable on only good mobs (it was usable on any attackable mobs before).

Co-Authored-By: Elmsroth <1208311+elmsroth@users.noreply.github.com>
  • Loading branch information
Necrovoice and Elmsroth committed Oct 18, 2020
1 parent b279dfe commit 5cbe3a5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/game/Server/SharedDefines.h
Expand Up @@ -3147,4 +3147,21 @@ enum TeleportLocation
TELEPORT_LOCATION_BG_ENTRY_POINT = 1,
};

// Creature entries for more readable code
enum CreatureEntriesConsts
{
CREATURE_TAINTED_OOZE = 7092,
CREATURE_CURSED_OOZE = 7086,
CREATURE_MUCULENT_OOZE = 6556,
CREATURE_PRIMAL_OOZE = 6557,
CREATURE_GLUTINOUS_OOZE = 6559,
};

enum SpellEntriesConsts
{
SPELL_FILLING_EMPTY_JAR__CURSED_OOZE = 15698,
SPELL_FILLING_EMPTY_JAR__TAINTED_OOZE = 15699,
SPELL_FILLING_EMPTY_JAR__PURE_OOZE = 15702, // (Works on Primal, Muculent and Glutonous Ooze)
};

#endif
34 changes: 34 additions & 0 deletions src/game/WorldHandlers/SpellEffects.cpp
Expand Up @@ -5778,6 +5778,40 @@ void Spell::DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype)

void Spell::EffectCreateItem(SpellEffectIndex eff_idx)
{
switch (m_spellInfo->Id)
{
case SPELL_FILLING_EMPTY_JAR__CURSED_OOZE: // Spell 15698 (for Cursed Ooze)
case SPELL_FILLING_EMPTY_JAR__TAINTED_OOZE: // Spell 15699 (for Tainted Ooze)
{
if (unitTarget->GetTypeId() == TYPEID_UNIT) {

Creature* creature = static_cast<Creature*>(unitTarget);
if (creature->IsDead() && (creature->GetEntry() == CREATURE_TAINTED_OOZE || creature->GetEntry() == CREATURE_CURSED_OOZE))
{
creature->ForcedDespawn();
}
}

break;
}
case SPELL_FILLING_EMPTY_JAR__PURE_OOZE: // Spell 15702 (for Primal, Muculent and Glutonous Ooze):
{
if (unitTarget->GetTypeId() == TYPEID_UNIT) {

Creature* creature = static_cast<Creature*>(unitTarget);
if (creature->IsDead() && (
creature->GetEntry() == CREATURE_MUCULENT_OOZE ||
creature->GetEntry() == CREATURE_PRIMAL_OOZE ||
creature->GetEntry() == CREATURE_GLUTINOUS_OOZE
))
{
creature->ForcedDespawn();
}
}

break;
}
}
DoCreateItem(eff_idx, m_spellInfo->EffectItemType[eff_idx]);
}

Expand Down

0 comments on commit 5cbe3a5

Please sign in to comment.