-
Notifications
You must be signed in to change notification settings - Fork 0
Aq40 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Aq40 #9
Changes from all commits
b98bd7f
888e17b
bb6c33f
6c3116e
743a507
33f32ba
84f9deb
7f1717e
d03c148
ec390ca
49e81eb
c05c5ff
f8a53f9
1eff832
d960d80
06f1eb0
e033308
5589f91
cb20f2c
6b81a9c
ed7cae4
40d0bfd
4cac420
ee444cd
a8670d6
24a580b
b2b8e74
39de97f
8e9adb8
2032fab
063d7c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,10 @@ | |
| #include "RaidNaxxStrategy.h" | ||
| #include "RaidOsStrategy.h" | ||
| #include "RaidEoEStrategy.h" | ||
| #include "RaidMcStrategy.h" | ||
| #include "RaidAq20Strategy.h" | ||
| #include "RaidAq40Strategy.h" | ||
| #include "RaidIccStrategy.h" | ||
|
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file now contains several duplicate entries, which can lead to compilation issues and makes the code harder to maintain. Specifically:
Please remove these duplicate entries. |
||
| #include "RaidVoAStrategy.h" | ||
| #include "RaidUlduarStrategy.h" | ||
| #include "RaidOnyxiaStrategy.h" | ||
|
|
@@ -20,11 +24,12 @@ class RaidStrategyContext : public NamedObjectContext<Strategy> | |
| public: | ||
| RaidStrategyContext() : NamedObjectContext<Strategy>(false, true) | ||
| { | ||
| creators["aq20"] = &RaidStrategyContext::aq20; | ||
| creators["mc"] = &RaidStrategyContext::mc; | ||
| creators["bwl"] = &RaidStrategyContext::bwl; | ||
| creators["karazhan"] = &RaidStrategyContext::karazhan; | ||
| creators["gruulslair"] = &RaidStrategyContext::gruulslair; | ||
| creators["aq20"] = &RaidStrategyContext::aq20; | ||
| creators["aq40"] = &RaidStrategyContext::aq40; | ||
| creators["naxx"] = &RaidStrategyContext::naxx; | ||
| creators["wotlk-os"] = &RaidStrategyContext::wotlk_os; | ||
| creators["wotlk-eoe"] = &RaidStrategyContext::wotlk_eoe; | ||
|
|
@@ -35,11 +40,12 @@ class RaidStrategyContext : public NamedObjectContext<Strategy> | |
| } | ||
|
|
||
| private: | ||
| static Strategy* aq20(PlayerbotAI* botAI) { return new RaidAq20Strategy(botAI); } | ||
| static Strategy* mc(PlayerbotAI* botAI) { return new RaidMcStrategy(botAI); } | ||
| static Strategy* bwl(PlayerbotAI* botAI) { return new RaidBwlStrategy(botAI); } | ||
| static Strategy* karazhan(PlayerbotAI* botAI) { return new RaidKarazhanStrategy(botAI); } | ||
| static Strategy* gruulslair(PlayerbotAI* botAI) { return new RaidGruulsLairStrategy(botAI); } | ||
| static Strategy* aq20(PlayerbotAI* botAI) { return new RaidAq20Strategy(botAI); } | ||
| static Strategy* aq40(PlayerbotAI* botAI) { return new RaidAq40Strategy(botAI); } | ||
| static Strategy* naxx(PlayerbotAI* botAI) { return new RaidNaxxStrategy(botAI); } | ||
| static Strategy* wotlk_os(PlayerbotAI* botAI) { return new RaidOsStrategy(botAI); } | ||
| static Strategy* wotlk_eoe(PlayerbotAI* botAI) { return new RaidEoEStrategy(botAI); } | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,44 @@ | ||||||||||||
| #ifndef _PLAYERBOT_RAIDAQ40ACTIONCONTEXT_H | ||||||||||||
| #define _PLAYERBOT_RAIDAQ40ACTIONCONTEXT_H | ||||||||||||
|
|
||||||||||||
| #include "Action.h" | ||||||||||||
| #include "NamedObjectContext.h" | ||||||||||||
| #include "RaidAq40Actions.h" | ||||||||||||
|
|
||||||||||||
| class RaidAq40ActionContext : public NamedObjectContext<Action> | ||||||||||||
| { | ||||||||||||
| public: | ||||||||||||
| RaidAq40ActionContext() | ||||||||||||
| { | ||||||||||||
| creators["aq40 use resistance buffs"] = &RaidAq40ActionContext::use_resistance_buffs; | ||||||||||||
| creators["aq40 move from other emperor"] = &RaidAq40ActionContext::move_from_other_emperor; | ||||||||||||
| creators["aq40 attack emperor vek'lor"] = &RaidAq40ActionContext::attack_emperor_veklor; | ||||||||||||
| creators["aq40 attack emperor vek'nilash"] = &RaidAq40ActionContext::attack_emperor_veknilash; | ||||||||||||
| creators["aq40 attack emperor pests"] = &RaidAq40ActionContext::attack_emperor_pests; | ||||||||||||
| creators["aq40 move towards emperor vek'lor"] = &RaidAq40ActionContext::move_towards_emperor_veklor; | ||||||||||||
| creators["aq40 move towards emperor vek'nilash"] = &RaidAq40ActionContext::move_towards_emperor_veknilash; | ||||||||||||
| creators["searing pain"] = &RaidAq40ActionContext::warlock_searing_pain; | ||||||||||||
| creators["frostbolt"] = &RaidAq40ActionContext::mage_cast_frostbolt; | ||||||||||||
| creators["aq40 melee viscidus"] = &RaidAq40ActionContext::melee_viscidus; | ||||||||||||
| creators["aq40 ouro burrowed flee"] = &RaidAq40ActionContext::ouro_burrowed_flee; | ||||||||||||
| creators["aq40 cthun1 get positioned"] = &RaidAq40ActionContext::cthun1_get_positioned; | ||||||||||||
| creators["aq40 cthun2 get positioned"] = &RaidAq40ActionContext::cthun2_get_positioned; | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| private: | ||||||||||||
| static Action* use_resistance_buffs(PlayerbotAI *ai) { return new Aq40UseResistanceBuffsAction(ai); } | ||||||||||||
| static Action* move_from_other_emperor(PlayerbotAI* ai) { return new Aq40MoveFromOtherEmperorAction(ai); } | ||||||||||||
| static Action* attack_emperor_veklor(PlayerbotAI* ai) { return new Aq40AttackEmperorVekLorAction(ai); } | ||||||||||||
| static Action* attack_emperor_veknilash(PlayerbotAI* ai) { return new Aq40AttackEmperorVekNilashAction(ai); } | ||||||||||||
| static Action* attack_emperor_pests(PlayerbotAI* ai) { return new Aq40AttackEmperorPestsAction(ai); } | ||||||||||||
| static Action* move_towards_emperor_veklor(PlayerbotAI* ai) { return (Action *)(new Aq40MoveTowardsEmperorVekLorAction(ai)); } | ||||||||||||
| static Action* move_towards_emperor_veknilash(PlayerbotAI* ai) { return (Action *)(new Aq40MoveTowardsEmperorVekNilashAction(ai)); } | ||||||||||||
|
Comment on lines
+34
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The C-style cast
Suggested change
|
||||||||||||
| static Action* warlock_searing_pain(PlayerbotAI* ai) { return new Aq40WarlockCastSearingPainAction(ai); } | ||||||||||||
| static Action* mage_cast_frostbolt(PlayerbotAI* ai) { return new Aq40MageCastFrostboltAction(ai); } | ||||||||||||
| static Action* melee_viscidus(PlayerbotAI* ai) { return new Aq40MeleeViscidusAction(ai); } | ||||||||||||
| static Action* ouro_burrowed_flee(PlayerbotAI* ai) { return new Aq40OuroBurrowedFleeAction(ai); } | ||||||||||||
| static Action* cthun1_get_positioned(PlayerbotAI* ai) { return new Aq40Cthun1PositionAction(ai); } | ||||||||||||
| static Action* cthun2_get_positioned(PlayerbotAI* ai) { return new Aq40Cthun2PositionAction(ai); } | ||||||||||||
| }; | ||||||||||||
|
|
||||||||||||
| #endif | ||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This large block of new
#includedirectives is unsorted. Sorting them alphabetically would improve readability and make it easier to spot duplicates or missing headers in the future.