mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
* Revert "[Large server fix] #1537 Serialize playerBots/botLoading with a mutex and use snapshot-based loops to fix concurrency crashes (#1540)" This reverts commit3fff58df1a. * Revert "[Fix] teleport to invalid map or invalid coordinates (x , y , z 200000, o ) given when teleporting player (g UI d full type player low , name , map , x , y , z , o ) (#1538)" This reverts commitca2e2ef0db. * Revert "Fix: prevent MoveSplineInitArgs::Validate velocity asserts (velocity > 0.01f) for bots, pets, and charmed units (#1534)" This reverts commit4e3ac609bd. * Revert "[Fix issue #1527] : startup crash in tank target selection — add TOCTOU & null-safety guards (#1532)" This reverts commitc6b0424c29. * Revert "[Fix issue #1528] Close small window where the “in a BG/arena” state can change between the check (InBattleground() / InArena()) and grabbing the pointer (GetBattleground()), which leads to a null dereference. (#1530)" This reverts commit2e0a161623. * Revert "Harden playerbot logout & packet dispatch; add null-safety in chat hooks and RPG checks (#1529)" This reverts commite4ea8e2694. * Revert "Dont wait to travel when in combat. (#1524)" This reverts commitddfa919154. * Revert "nullptr fix (#1523)" This reverts commit380312ffd2. * Revert "Playerbots/LFG: fix false not eligible & dungeon 0/type 0, add clear diagnostics (#1521)" This reverts commit872e417613. * Revert "nullptr exception (#1520)" This reverts commit3d28a81508. * Revert "Removed bot freezing at startup and system message, not relevant anymore (#1519)" This reverts commitbcd6f5bc06.
53 lines
2.2 KiB
C++
53 lines
2.2 KiB
C++
/*
|
|
* 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_H
|
|
#define _PLAYERBOT_H
|
|
|
|
#include "AiObjectContext.h"
|
|
#include "Group.h"
|
|
#include "Pet.h"
|
|
#include "PlayerbotAI.h"
|
|
#include "PlayerbotAIConfig.h"
|
|
#include "PlayerbotMgr.h"
|
|
#include "RandomPlayerbotMgr.h"
|
|
#include "SharedValueContext.h"
|
|
#include "Spell.h"
|
|
#include "SpellMgr.h"
|
|
#include "TravelNode.h"
|
|
|
|
std::vector<std::string> split(std::string const s, char delim);
|
|
void split(std::vector<std::string>& dest, std::string const str, char const* delim);
|
|
#ifndef WIN32
|
|
int strcmpi(char const* s1, char const* s2);
|
|
#endif
|
|
|
|
#define CAST_ANGLE_IN_FRONT (2.f * static_cast<float>(M_PI) / 3.f)
|
|
#define EMOTE_ANGLE_IN_FRONT (2.f * static_cast<float>(M_PI) / 6.f)
|
|
|
|
#define GET_PLAYERBOT_AI(object) sPlayerbotsMgr->GetPlayerbotAI(object)
|
|
#define GET_PLAYERBOT_MGR(object) sPlayerbotsMgr->GetPlayerbotMgr(object)
|
|
|
|
#define AI_VALUE(type, name) context->GetValue<type>(name)->Get()
|
|
#define AI_VALUE2(type, name, param) context->GetValue<type>(name, param)->Get()
|
|
|
|
#define AI_VALUE_LAZY(type, name) context->GetValue<type>(name)->LazyGet()
|
|
#define AI_VALUE2_LAZY(type, name, param) context->GetValue<type>(name, param)->LazyGet()
|
|
|
|
#define AI_VALUE_REF(type, name) context->GetValue<type>(name)->RefGet()
|
|
|
|
#define SET_AI_VALUE(type, name, value) context->GetValue<type>(name)->Set(value)
|
|
#define SET_AI_VALUE2(type, name, param, value) context->GetValue<type>(name, param)->Set(value)
|
|
#define RESET_AI_VALUE(type, name) context->GetValue<type>(name)->Reset()
|
|
#define RESET_AI_VALUE2(type, name, param) context->GetValue<type>(name, param)->Reset()
|
|
|
|
#define PAI_VALUE(type, name) sPlayerbotsMgr->GetPlayerbotAI(player)->GetAiObjectContext()->GetValue<type>(name)->Get()
|
|
#define PAI_VALUE2(type, name, param) \
|
|
sPlayerbotsMgr->GetPlayerbotAI(player)->GetAiObjectContext()->GetValue<type>(name, param)->Get()
|
|
#define GAI_VALUE(type, name) sSharedValueContext->getGlobalValue<type>(name)->Get()
|
|
#define GAI_VALUE2(type, name, param) sSharedValueContext->getGlobalValue<type>(name, param)->Get()
|
|
|
|
#endif
|