@@ -21,9 +21,8 @@ Position const WS_FLAG_POS_HORDE = { 915.958f, 1433.925f, 346.193f, 0.0f };
21
21
Position const WS_FLAG_POS_ALLIANCE = { 1539 .219f , 1481 .747f , 352 .458f , 0 .0f };
22
22
Position const WS_FLAG_HIDE_HORDE_1 = { 928 .178f , 1458 .432f , 346 .889f , 4 .8f };
23
23
Position const WS_FLAG_HIDE_HORDE_2 = { 914 .954f , 1439 .540f , 346 .415f , 4 .7f };
24
- Position const WS_FLAG_HIDE_HORDE_3 = { 1163 .820f , 1373 .625f , 312 .23f , 4 .7f };
25
- Position const WS_FLAG_HIDE_HORDE_4 = { 924 .0f , 1454 .0f , 355 .0f , 4 .07f };
26
- Position const WS_FLAG_HIDE_HORDE_5 = { 963 .0f , 1421 .0f , 367 .0f , 4 .07f };
24
+ Position const WS_FLAG_HIDE_HORDE_3 = { 924 .0f , 1454 .0f , 355 .0f , 4 .07f };
25
+ Position const WS_FLAG_HIDE_HORDE_4 = { 963 .0f , 1421 .0f , 367 .0f , 4 .07f };
27
26
Position const WS_FLAG_HIDE_ALLIANCE_1 = { 1529 .249f , 1456 .470f , 353 .04f , 1 .25f };
28
27
Position const WS_FLAG_HIDE_ALLIANCE_2 = { 1540 .286f , 1476 .026f , 352 .692f , 2 .91f };
29
28
Position const WS_FLAG_HIDE_ALLIANCE_3 = { 1495 .807f , 1466 .774f , 352 .350f , 1 .50f };
@@ -37,7 +36,7 @@ Position const WS_FLAG_ALLIANCE_FLOOR_JUMP_UPPER = { 1529.f, 1468.f, 362.f, 1.50
37
36
Position const WS_FLAG_ALLIANCE_FLOOR_JUMP_LOWER = { 1531 .f , 1475 .f , 352 .f , 1 .50f };
38
37
Position const WS_FLAG_HORDE_FLOOR_JUMP_UPPER = { 926 .f , 1451 .f , 355 .f , 1 .50f };
39
38
Position const WS_FLAG_HORDE_FLOOR_JUMP_LOWER = { 925 .f , 1444 .f , 345 .f , 1 .50f };
40
- std::vector<Position> const WS_FLAG_HIDE_HORDE = { WS_FLAG_HIDE_HORDE_1 , WS_FLAG_HIDE_HORDE_2, WS_FLAG_HIDE_HORDE_3, WS_FLAG_HIDE_HORDE_4, WS_FLAG_HIDE_HORDE_5 };
39
+ std::vector<Position> const WS_FLAG_HIDE_HORDE = { WS_FLAG_HIDE_HORDE_1 , WS_FLAG_HIDE_HORDE_2, WS_FLAG_HIDE_HORDE_3, WS_FLAG_HIDE_HORDE_4, WS_FLAG_HIDE_HORDE_4 };
41
40
std::vector<Position> const WS_FLAG_HIDE_ALLIANCE = { WS_FLAG_HIDE_ALLIANCE_1 , WS_FLAG_HIDE_ALLIANCE_2, WS_FLAG_HIDE_ALLIANCE_3, WS_FLAG_HIDE_ALLIANCE_4, WS_FLAG_HIDE_ALLIANCE_5 };
42
41
Position const AB_WAITING_POS_HORDE = { 702 .884f , 703 .045f , -16 .115f , 0 .77f };
43
42
Position const AB_WAITING_POS_ALLIANCE = { 1286 .054f , 1282 .500f , -15 .697f , 3 .95f };
@@ -3015,31 +3014,28 @@ bool BGTactics::selectObjective(bool reset)
3015
3014
{
3016
3015
if (bot->GetTeam () == ALLIANCE)
3017
3016
{
3018
- // if (teamFlagTaken())
3019
- // {
3020
- // Position hidePos = WS_FLAG_HIDE_ALLIANCE[urand(0, 4)];
3021
- // pos.Set(hidePos.x, hidePos.y, hidePos.z, bot->GetMapId());
3022
- // }
3023
- // else
3024
- pos.Set (WS_FLAG_POS_ALLIANCE.x , WS_FLAG_POS_ALLIANCE.y , WS_FLAG_POS_ALLIANCE.z , bot->GetMapId ());
3017
+ if (teamFlagTaken ())
3018
+ {
3019
+ Position hidePos = WS_FLAG_HIDE_ALLIANCE[urand (0 , 4 )];
3020
+ pos.Set (hidePos.x , hidePos.y , hidePos.z , bot->GetMapId ());
3021
+ }
3022
+ else
3023
+ {
3024
+ pos.Set (WS_FLAG_POS_ALLIANCE.x , WS_FLAG_POS_ALLIANCE.y , WS_FLAG_POS_ALLIANCE.z , bot->GetMapId ());
3025
+ }
3025
3026
}
3026
3027
else
3027
3028
{
3028
- // if (teamFlagTaken())
3029
- // {
3030
- // Position hidePos = WS_FLAG_HIDE_HORDE[urand(0, 4)];
3031
- // pos.Set(hidePos.x, hidePos.y, hidePos.z, bot->GetMapId());
3032
- // }
3033
- // else
3034
- pos.Set (WS_FLAG_POS_HORDE.x , WS_FLAG_POS_HORDE.y , WS_FLAG_POS_HORDE.z , bot->GetMapId ());
3029
+ if (teamFlagTaken ())
3030
+ {
3031
+ Position hidePos = WS_FLAG_HIDE_HORDE[urand (0 , 4 )];
3032
+ pos.Set (hidePos.x , hidePos.y , hidePos.z , bot->GetMapId ());
3033
+ }
3034
+ else
3035
+ {
3036
+ pos.Set (WS_FLAG_POS_HORDE.x , WS_FLAG_POS_HORDE.y , WS_FLAG_POS_HORDE.z , bot->GetMapId ());
3037
+ }
3035
3038
}
3036
-
3037
- // ostringstream out;
3038
- // if (teamFlagTaken())
3039
- // out << "Hiding with flag" << (bot->GetTeam() == ALLIANCE ? "in Alliance base" : "in Horde base");
3040
- // else
3041
- // out << "Taking " << (bot->GetTeam() == ALLIANCE ? "Horde flag to base" : "Alliance flag to base");
3042
- // bot->Say(out.str(), LANG_UNIVERSAL);
3043
3039
}
3044
3040
else
3045
3041
{
@@ -4206,21 +4202,11 @@ bool BGTactics::resetObjective()
4206
4202
ai::PositionMap& posMap = context->GetValue <ai::PositionMap&>(" position" )->Get ();
4207
4203
ai::PositionEntry pos = context->GetValue <ai::PositionMap&>(" position" )->Get ()[" bg objective" ];
4208
4204
// do not switch hiding spots - disabled for now until hiding spots reimplemented since it causes bots to stop moving
4209
- // if (teamFlagTaken() && (bot->HasAura(BG_WS_SPELL_WARSONG_FLAG) || bot->HasAura(BG_WS_SPELL_SILVERWING_FLAG)))
4210
- // {
4211
- // return false;
4212
-
4213
- /* if (bot->GetTeam() == HORDE)
4214
- {
4215
- if (pos.x != WS_FLAG_POS_HORDE.x && pos.x != WS_FLAG_POS_ALLIANCE.x && pos.y != WS_FLAG_POS_HORDE.y && pos.y != WS_FLAG_POS_ALLIANCE.y)
4216
- return false;
4217
- }
4218
- else
4219
- {
4220
- if (pos.x != WS_FLAG_POS_HORDE.x && pos.x != WS_FLAG_POS_ALLIANCE.x && pos.y != WS_FLAG_POS_HORDE.y && pos.y != WS_FLAG_POS_ALLIANCE.y)
4221
- return false;
4222
- }*/
4223
- // }
4205
+ if (teamFlagTaken () && (bot->HasAura (BG_WS_SPELL_WARSONG_FLAG) || bot->HasAura (BG_WS_SPELL_SILVERWING_FLAG)))
4206
+ {
4207
+ if (pos.x != WS_FLAG_POS_HORDE.x && pos.x != WS_FLAG_POS_ALLIANCE.x && pos.y != WS_FLAG_POS_HORDE.y && pos.y != WS_FLAG_POS_ALLIANCE.y )
4208
+ return false ;
4209
+ }
4224
4210
pos.Reset ();
4225
4211
posMap[" bg objective" ] = pos;
4226
4212
0 commit comments