Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Author: Byeqq*/
- /*###############
- ##mob_reservist##
- ###############*/
- enum
- {
- SPELL_NORTH_FLEET_RESERVIST_KILL_CREDIT = 43138,
- QUEST_TEST_AT_SEA = 11170,
- SPELL_PLAGUE_VIAL = 43115
- };
- struct MANGOS_DLL_DECL mob_reservistAI : public ScriptedAI
- {
- mob_reservistAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- SetCombatMovement(false);
- Reset();
- }
- void Reset(){}
- void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
- {
- if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_PLAGUE_VIAL)
- {
- if (((Player*)pCaster)->GetQuestStatus(QUEST_TEST_AT_SEA) == QUEST_STATUS_INCOMPLETE)
- {
- m_creature->CastSpell(pCaster,SPELL_NORTH_FLEET_RESERVIST_KILL_CREDIT,true);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- }
- }
- }
- };
- CreatureAI* GetAI_mob_reservist(Creature* pCreature)
- {
- return new mob_reservistAI(pCreature);
- }
- void AddSC_howling_fjord()
- {
- Script* newscript;
- newscript = new Script;
- newscript->Name = "mob_reservist";
- newscript->GetAI = &GetAI_mob_reservist;
- newscript->RegisterSelf();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement