mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-15 01:49:09 +00:00
Run clang-format
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "SeeSpellAction.h"
|
||||
|
||||
#include "Event.h"
|
||||
#include "Formations.h"
|
||||
#include "PathGenerator.h"
|
||||
#include "Playerbots.h"
|
||||
#include "RtscAction.h"
|
||||
#include "RTSCValues.h"
|
||||
#include "RtscAction.h"
|
||||
|
||||
Creature* SeeSpellAction::CreateWps(Player* wpOwner, float x, float y, float z, float o, uint32 entry, Creature* lastWp, bool important)
|
||||
Creature* SeeSpellAction::CreateWps(Player* wpOwner, float x, float y, float z, float o, uint32 entry, Creature* lastWp,
|
||||
bool important)
|
||||
{
|
||||
float dist = wpOwner->GetDistance(x, y, z);
|
||||
float delay = 1000.0f * dist / wpOwner->GetSpeed(MOVE_RUN) + sPlayerbotAIConfig->reactDelay;
|
||||
@@ -27,7 +30,7 @@ Creature* SeeSpellAction::CreateWps(Player* wpOwner, float x, float y, float z,
|
||||
|
||||
bool SeeSpellAction::Execute(Event event)
|
||||
{
|
||||
WorldPacket p(event.getPacket()); //
|
||||
WorldPacket p(event.getPacket()); //
|
||||
uint32 spellId;
|
||||
uint8 castCount, castFlags;
|
||||
Player* master = botAI->GetMaster();
|
||||
@@ -38,8 +41,8 @@ bool SeeSpellAction::Execute(Event event)
|
||||
if (!master)
|
||||
return false;
|
||||
|
||||
//if (!botAI->HasStrategy("RTSC", botAI->GetState()))
|
||||
// return false;
|
||||
// if (!botAI->HasStrategy("RTSC", botAI->GetState()))
|
||||
// return false;
|
||||
|
||||
if (spellId != RTSC_MOVE_SPELL)
|
||||
return false;
|
||||
@@ -91,7 +94,9 @@ bool SeeSpellAction::Execute(Event event)
|
||||
|
||||
SET_AI_VALUE2(WorldPosition, "RTSC saved location", locationName, spellPosition);
|
||||
|
||||
Creature* wpCreature = bot->SummonCreature(15631, spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(), spellPosition.getO(), TEMPSUMMON_TIMED_DESPAWN, 2000.0f);
|
||||
Creature* wpCreature =
|
||||
bot->SummonCreature(15631, spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(),
|
||||
spellPosition.getO(), TEMPSUMMON_TIMED_DESPAWN, 2000.0f);
|
||||
wpCreature->SetObjectScale(0.5f);
|
||||
RESET_AI_VALUE(std::string, "RTSC next spell action");
|
||||
|
||||
@@ -121,7 +126,8 @@ bool SeeSpellAction::MoveToSpell(WorldPosition& spellPosition, bool inFormation)
|
||||
if (bot->IsWithinLOS(spellPosition.getX(), spellPosition.getY(), spellPosition.getZ()))
|
||||
return MoveNear(spellPosition.getMapId(), spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(), 0);
|
||||
|
||||
return MoveTo(spellPosition.getMapId(), spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(), false, false);
|
||||
return MoveTo(spellPosition.getMapId(), spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(), false,
|
||||
false);
|
||||
}
|
||||
|
||||
void SeeSpellAction::SetFormationOffset(WorldPosition& spellPosition)
|
||||
|
||||
Reference in New Issue
Block a user