mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
refactored BWL's action/trigger context's to be consistent with other raids (which define these things in header files with raid name in it, and in the same directory as other raid related code)
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
#include "ValueContext.h"
|
||||
#include "WorldPacketActionContext.h"
|
||||
#include "WorldPacketTriggerContext.h"
|
||||
#include "raids/RaidActionContext.h"
|
||||
#include "raids/RaidStrategyContext.h"
|
||||
#include "raids/RaidTriggerContext.h"
|
||||
#include "raids/blackwinglair/RaidBwlActionContext.h"
|
||||
#include "raids/blackwinglair/RaidBwlTriggerContext.h"
|
||||
#include "raids/naxxramas/RaidNaxxActionContext.h"
|
||||
#include "raids/naxxramas/RaidNaxxTriggerContext.h"
|
||||
#include "raids/moltencore/RaidMcActionContext.h"
|
||||
@@ -38,7 +38,7 @@ AiObjectContext::AiObjectContext(PlayerbotAI* botAI) : PlayerbotAIAware(botAI)
|
||||
actionContexts.Add(new ActionContext());
|
||||
actionContexts.Add(new ChatActionContext());
|
||||
actionContexts.Add(new WorldPacketActionContext());
|
||||
actionContexts.Add(new RaidActionContext());
|
||||
actionContexts.Add(new RaidBwlActionContext());
|
||||
actionContexts.Add(new RaidNaxxActionContext());
|
||||
actionContexts.Add(new RaidUlduarActionContext());
|
||||
actionContexts.Add(new RaidMcActionContext());
|
||||
@@ -47,7 +47,7 @@ AiObjectContext::AiObjectContext(PlayerbotAI* botAI) : PlayerbotAIAware(botAI)
|
||||
triggerContexts.Add(new TriggerContext());
|
||||
triggerContexts.Add(new ChatTriggerContext());
|
||||
triggerContexts.Add(new WorldPacketTriggerContext());
|
||||
triggerContexts.Add(new RaidTriggerContext());
|
||||
triggerContexts.Add(new RaidBwlTriggerContext());
|
||||
triggerContexts.Add(new RaidNaxxTriggerContext());
|
||||
triggerContexts.Add(new RaidUlduarTriggerContext());
|
||||
triggerContexts.Add(new RaidMcTriggerContext());
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
||||
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_RAIDACTIONCONTEXTACTION_H
|
||||
#define _PLAYERBOT_RAIDACTIONCONTEXTACTION_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "raids/blackwinglair/RaidBwlActions.h"
|
||||
|
||||
class RaidActionContext : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
RaidActionContext()
|
||||
{
|
||||
creators["bwl check onyxia scale cloak"] = &RaidActionContext::bwl_check_onyxia_scale_cloak;
|
||||
creators["bwl turn off suppression device"] = &RaidActionContext::bwl_turn_off_suppression_device;
|
||||
creators["bwl use hourglass sand"] = &RaidActionContext::bwl_use_hourglass_sand;
|
||||
}
|
||||
|
||||
private:
|
||||
static Action* bwl_check_onyxia_scale_cloak(PlayerbotAI* botAI)
|
||||
{
|
||||
return new BwlOnyxiaScaleCloakAuraCheckAction(botAI);
|
||||
}
|
||||
static Action* bwl_turn_off_suppression_device(PlayerbotAI* botAI)
|
||||
{
|
||||
return new BwlTurnOffSuppressionDeviceAction(botAI);
|
||||
}
|
||||
static Action* bwl_use_hourglass_sand(PlayerbotAI* botAI)
|
||||
{
|
||||
return new BwlUseHourglassSandAction(botAI);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,27 +0,0 @@
|
||||
// /*
|
||||
// * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
||||
// and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
// */
|
||||
|
||||
#ifndef _PLAYERBOT_RAIDTRIGGERCONTEXT_H
|
||||
#define _PLAYERBOT_RAIDTRIGGERCONTEXT_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "raids/blackwinglair/RaidBwlTriggers.h"
|
||||
#include "raids/naxxramas/RaidNaxxTriggers.h"
|
||||
|
||||
class RaidTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
RaidTriggerContext() {
|
||||
creators["bwl suppression device"] = &RaidTriggerContext::bwl_suppression_device;
|
||||
creators["bwl affliction bronze"] = &RaidTriggerContext::bwl_affliction_bronze;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* bwl_suppression_device(PlayerbotAI* ai) { return new BwlSuppressionDeviceTrigger(ai); }
|
||||
static Trigger* bwl_affliction_bronze(PlayerbotAI* ai) { return new BwlAfflictionBronzeTrigger(ai); }
|
||||
};
|
||||
|
||||
#endif
|
||||
24
src/strategy/raids/blackwinglair/RaidBwlActionContext.h
Normal file
24
src/strategy/raids/blackwinglair/RaidBwlActionContext.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef _PLAYERBOT_RAIDBWLACTIONCONTEXT_H
|
||||
#define _PLAYERBOT_RAIDBWLACTIONCONTEXT_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "RaidBwlActions.h"
|
||||
|
||||
class RaidBwlActionContext : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
RaidBwlActionContext()
|
||||
{
|
||||
creators["bwl check onyxia scale cloak"] = &RaidBwlActionContext::bwl_check_onyxia_scale_cloak;
|
||||
creators["bwl turn off suppression device"] = &RaidBwlActionContext::bwl_turn_off_suppression_device;
|
||||
creators["bwl use hourglass sand"] = &RaidBwlActionContext::bwl_use_hourglass_sand;
|
||||
}
|
||||
|
||||
private:
|
||||
static Action* bwl_check_onyxia_scale_cloak(PlayerbotAI* botAI) { return new BwlOnyxiaScaleCloakAuraCheckAction(botAI); }
|
||||
static Action* bwl_turn_off_suppression_device(PlayerbotAI* botAI) { return new BwlTurnOffSuppressionDeviceAction(botAI); }
|
||||
static Action* bwl_use_hourglass_sand(PlayerbotAI* botAI) { return new BwlUseHourglassSandAction(botAI); }
|
||||
};
|
||||
|
||||
#endif
|
||||
22
src/strategy/raids/blackwinglair/RaidBwlTriggerContext.h
Normal file
22
src/strategy/raids/blackwinglair/RaidBwlTriggerContext.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _PLAYERBOT_RAIDBWLTRIGGERCONTEXT_H
|
||||
#define _PLAYERBOT_RAIDBWLTRIGGERCONTEXT_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "RaidBwlTriggers.h"
|
||||
|
||||
class RaidBwlTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
RaidBwlTriggerContext()
|
||||
{
|
||||
creators["bwl suppression device"] = &RaidBwlTriggerContext::bwl_suppression_device;
|
||||
creators["bwl affliction bronze"] = &RaidBwlTriggerContext::bwl_affliction_bronze;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* bwl_suppression_device(PlayerbotAI* ai) { return new BwlSuppressionDeviceTrigger(ai); }
|
||||
static Trigger* bwl_affliction_bronze(PlayerbotAI* ai) { return new BwlAfflictionBronzeTrigger(ai); }
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user