加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CPlayer.h 2.82 KB
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include "Entities/Player.h"
#include <sstream>
// Move those please.
static const std::string MSG_COLOR_LIGHTRED = "|cffff6060";
static const std::string MSG_COLOR_LIGHTBLUE = "|cff00ccff";
static const std::string MSG_COLOR_ANN_GREEN = "|c1f40af20";
static const std::string MSG_COLOR_RED = "|cffff0000";
static const std::string MSG_COLOR_GOLD = "|cffffcc00";
static const std::string MSG_COLOR_SUBWHITE = "|cffbbbbbb";
static const std::string MSG_COLOR_MAGENTA = "|cffff00ff";
static const std::string MSG_COLOR_YELLOW = "|cffffff00";
static const std::string MSG_COLOR_CYAN = "|cff00ffff";
static const std::string MSG_COLOR_DARKBLUE = "|cff0000ff";
static const std::string MSG_COLOR_GREY = "|cff9d9d9d";
static const std::string MSG_COLOR_WHITE = "|cffffffff";
static const std::string MSG_COLOR_GREEN = "|cff1eff00";
static const std::string MSG_COLOR_BLUE = "|cff0080ff";
static const std::string MSG_COLOR_PURPLE = "|cffb048f8";
static const std::string MSG_COLOR_ORANGE = "|cffff8000";
static const std::string MSG_COLOR_DRUID = "|cffff7d0a";
static const std::string MSG_COLOR_HUNTER = "|cffabd473";
static const std::string MSG_COLOR_MAGE = "|cff69ccf0";
static const std::string MSG_COLOR_PALADIN = "|cfff58cba";
static const std::string MSG_COLOR_PRIEST = "|cffffffff";
static const std::string MSG_COLOR_ROGUE = "|cfffff569";
static const std::string MSG_COLOR_SHAMAN = "|cff0070de";
static const std::string MSG_COLOR_WARLOCK = "|cff9482c9";
static const std::string MSG_COLOR_WARRIOR = "|cffc79c6e";
enum MessageTypes
{
CHAT_BOX = 0x1,
CHAT_WIDE = 0x2
};
class AntiCheat;
class CPlayer : public Player
{
// Typedefs
public:
typedef std::vector<AntiCheat*> AntiCheatStorage;
// Constructor / destructor
public:
explicit CPlayer(WorldSession* session);
~CPlayer();
// Cast helper
public:
Player* ToPlayer() { return static_cast<Player*>(this); }
// AntiCheat
public:
virtual void DismountEvent() override;
bool HandleAntiCheat(MovementInfo& moveInfo, Opcodes opcode);
void HandleKnockBack(float angle, float horizontalSpeed, float verticalSpeed);
void HandleRelocate(float x, float y, float z, float o);
void HandleTeleport(uint32 map, float x, float y, float z, float o);
void HandleUpdate(uint32 update_diff/*, uint32 p_time*/);
void AddAntiCheatModule(AntiCheat* antiCheat);
void SetGMFly(bool value) { m_GMFly = value; }
bool GetGMFly() { return m_GMFly; }
private:
AntiCheatStorage m_AntiCheatStorage;
bool m_GMFly;
// Chat messages
public:
void SendSteamMessages(MessageTypes type, std::stringstream &ss);
std::stringstream BoxChat;
std::stringstream WideChat;
std::stringstream BothChat;
// Hooked Player functions
public:
void CUpdate(uint32 update_diff/*, uint32 p_time*/);
// Misc
bool AddAura(uint32 spellid);
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化