Skip to content

Commit 5bd3d5d

Browse files
committed
Scripts/Quest: Remove unused code
1 parent a0f2832 commit 5bd3d5d

File tree

2 files changed

+0
-124
lines changed

2 files changed

+0
-124
lines changed

src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -115,85 +115,6 @@ class npc_wounded_coldridge_mountaineer : public CreatureScript
115115
}
116116
};
117117

118-
/*####
119-
## npc_wounded_milita
120-
####*/
121-
122-
enum WoundedMilita
123-
{
124-
QUEST_KILL_CREDIT = 44175,
125-
SPELL_FLASH_HEAL = 2061,
126-
EVENT_RESET_HEALTH = 4
127-
};
128-
129-
class npc_wounded_milita : public CreatureScript
130-
{
131-
public:
132-
npc_wounded_milita() : CreatureScript("npc_wounded_milita") { }
133-
134-
struct npc_wounded_militaAI : public ScriptedAI
135-
{
136-
npc_wounded_militaAI(Creature* creature) : ScriptedAI(creature)
137-
{
138-
Initialize();
139-
}
140-
141-
void Initialize()
142-
{
143-
_hitBySpell = false;
144-
_percentHP = urand(15, 55);
145-
}
146-
147-
void Reset() override
148-
{
149-
Initialize();
150-
me->SetHealth(me->CountPctFromMaxHealth(_percentHP));
151-
}
152-
153-
void SpellHit(Unit* caster, SpellInfo const* spell) override
154-
{
155-
if (!_hitBySpell)
156-
{
157-
_hitBySpell = true;
158-
_events.ScheduleEvent(EVENT_RESET_HEALTH, Seconds(30));
159-
}
160-
if (spell->Id == SPELL_FLASH_HEAL)
161-
if (Player* player = caster->ToPlayer())
162-
player->KilledMonsterCredit(QUEST_KILL_CREDIT);
163-
}
164-
165-
void UpdateAI(uint32 diff) override
166-
{
167-
if (!_hitBySpell)
168-
return;
169-
170-
_events.Update(diff);
171-
172-
while (uint32 eventId = _events.ExecuteEvent())
173-
{
174-
switch (eventId)
175-
{
176-
case EVENT_RESET_HEALTH:
177-
me->SetHealth(me->CountPctFromMaxHealth(_percentHP));
178-
_hitBySpell = false;
179-
break;
180-
default:
181-
break;
182-
}
183-
}
184-
}
185-
private:
186-
EventMap _events;
187-
int8 _percentHP;
188-
bool _hitBySpell;
189-
};
190-
191-
CreatureAI* GetAI(Creature* creature) const override
192-
{
193-
return new npc_wounded_militaAI(creature);
194-
}
195-
};
196-
197118
/*######
198119
## npc_milos_gyro
199120
######*/
@@ -463,7 +384,6 @@ class spell_low_health: public SpellScriptLoader
463384
void AddSC_dun_morogh_area_coldridge_valley()
464385
{
465386
new npc_wounded_coldridge_mountaineer();
466-
new npc_wounded_milita();
467387
new npc_milos_gyro();
468388
new spell_a_trip_to_ironforge_quest_complete();
469389
new spell_follow_that_gyrocopter_quest_start();

src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ EndScriptData */
2626
/* ContentData
2727
npc_draenei_survivor
2828
npc_engineer_spark_overgrind
29-
npc_injured_draenei
3029
npc_magwin
3130
go_ravager_cage
3231
npc_death_ravager
@@ -278,48 +277,6 @@ class npc_engineer_spark_overgrind : public CreatureScript
278277
}
279278
};
280279

281-
/*######
282-
## npc_injured_draenei
283-
######*/
284-
285-
class npc_injured_draenei : public CreatureScript
286-
{
287-
public:
288-
npc_injured_draenei() : CreatureScript("npc_injured_draenei") { }
289-
290-
struct npc_injured_draeneiAI : public ScriptedAI
291-
{
292-
npc_injured_draeneiAI(Creature* creature) : ScriptedAI(creature) { }
293-
294-
void Reset() override
295-
{
296-
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
297-
me->SetHealth(me->CountPctFromMaxHealth(15));
298-
switch (urand(0, 1))
299-
{
300-
case 0:
301-
me->SetStandState(UNIT_STAND_STATE_SIT);
302-
break;
303-
304-
case 1:
305-
me->SetStandState(UNIT_STAND_STATE_SLEEP);
306-
break;
307-
}
308-
}
309-
310-
void JustEngagedWith(Unit* /*who*/) override { }
311-
312-
void MoveInLineOfSight(Unit* /*who*/) override { }
313-
314-
void UpdateAI(uint32 /*diff*/) override { }
315-
};
316-
317-
CreatureAI* GetAI(Creature* creature) const override
318-
{
319-
return new npc_injured_draeneiAI(creature);
320-
}
321-
};
322-
323280
/*######
324281
## npc_magwin
325282
######*/
@@ -721,7 +678,6 @@ void AddSC_azuremyst_isle()
721678
{
722679
new npc_draenei_survivor();
723680
new npc_engineer_spark_overgrind();
724-
new npc_injured_draenei();
725681
new npc_magwin();
726682
new npc_death_ravager();
727683
new go_ravager_cage();

0 commit comments

Comments
 (0)