mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core: Quest - The art of persuasion
This commit is contained in:
@@ -2772,6 +2772,10 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case 60256:
|
||||
//Crashes client on pressing ESC (Maybe because of ReqSpellFocus and GameObject)
|
||||
spellInfo->AttributesEx4 &= ~SPELL_ATTR4_TRIGGERED;
|
||||
break;
|
||||
case 1776: // Gouge
|
||||
case 1777:
|
||||
case 8629:
|
||||
|
||||
@@ -1667,7 +1667,6 @@ public:
|
||||
/*######
|
||||
## npc_imprisoned_beryl_sorcerer
|
||||
######*/
|
||||
|
||||
enum eImprisionedBerylSorcerer
|
||||
{
|
||||
SPELL_NEURAL_NEEDLE = 45634,
|
||||
@@ -1692,108 +1691,86 @@ public:
|
||||
{
|
||||
npc_imprisoned_beryl_sorcererAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint64 CasterGUID;
|
||||
|
||||
uint32 uiStep;
|
||||
uint32 uiPhase;
|
||||
uint32 rebuff;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiStep = 1;
|
||||
uiPhase = 0;
|
||||
CasterGUID = 0;
|
||||
if (me->GetReactState() != REACT_PASSIVE)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
rebuff = 0;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
UpdateVictim();
|
||||
|
||||
if (rebuff <= diff)
|
||||
{
|
||||
if (!me->HasAura(SPELL_COSMETIC_ENSLAVE_CHAINS_SELF))
|
||||
{
|
||||
DoCast(me, SPELL_COSMETIC_ENSLAVE_CHAINS_SELF);
|
||||
}
|
||||
rebuff = 180000;
|
||||
}
|
||||
else
|
||||
rebuff -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void SpellHit(Unit* unit, const SpellInfo* pSpell)
|
||||
void SpellHit(Unit* unit, const SpellInfo* spell)
|
||||
{
|
||||
if (pSpell->Id == SPELL_NEURAL_NEEDLE && unit->GetTypeId() == TYPEID_PLAYER)
|
||||
if (spell->Id == SPELL_NEURAL_NEEDLE && unit->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
++uiPhase;
|
||||
CasterGUID = unit->GetGUID();
|
||||
if (Player* player = unit->ToPlayer())
|
||||
{
|
||||
GotStinged(player->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
void GotStinged(uint64 casterGUID)
|
||||
{
|
||||
ScriptedAI::UpdateAI(uiDiff);
|
||||
|
||||
if (!me->HasAura(SPELL_COSMETIC_ENSLAVE_CHAINS_SELF))
|
||||
DoCast(me, SPELL_COSMETIC_ENSLAVE_CHAINS_SELF);
|
||||
|
||||
if (me->GetReactState() != REACT_PASSIVE)
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
switch (uiPhase)
|
||||
if(Player* caster = Player::GetPlayer(*me, casterGUID))
|
||||
{
|
||||
uint32 step = caster->GetAuraCount(SPELL_NEURAL_NEEDLE) + 1;
|
||||
switch (step)
|
||||
{
|
||||
case 1:
|
||||
if (uiStep == 1)
|
||||
{
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_1, me);
|
||||
uiStep = 2;
|
||||
}
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_1, me);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (uiStep == 2)
|
||||
{
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_2, me);
|
||||
uiStep = 3;
|
||||
}
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_2, me, caster);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (uiStep == 3)
|
||||
{
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_3, me);
|
||||
uiStep = 4;
|
||||
}
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_3, me);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (uiStep == 4)
|
||||
{
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_4, me);
|
||||
uiStep = 5;
|
||||
}
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_4, me);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (uiStep == 5)
|
||||
{
|
||||
if (Player* pCaster = Unit::GetPlayer(*me, CasterGUID))
|
||||
{
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_5, me);
|
||||
pCaster->KilledMonsterCredit(25478, 0);
|
||||
uiStep = 6;
|
||||
}
|
||||
}
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_5, me);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (uiStep == 6)
|
||||
{
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_6, me);
|
||||
uiStep = 7;
|
||||
}
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_6, me, caster);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (uiStep == 7)
|
||||
{
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_7, me);
|
||||
uiStep = 1;
|
||||
uiPhase = 0;
|
||||
}
|
||||
DoScriptText(SAY_IMPRISIONED_BERYL_7, me);
|
||||
caster->KilledMonsterCredit(25478, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_imprisoned_beryl_sorcererAI(creature);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user