Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
隐藏空白更改
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
文本样式
更改外观
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled diff
创建于
10年前
差异永不过期
清除
导出
分享
解释
52 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
108 行
全部复制
105 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
161 行
全部复制
#ifndef PREMIUM_SYSTEM_H
#ifndef PREMIUM_SYSTEM_H
#define PREMIUM_SYSTEM_H
#define PREMIUM_SYSTEM_H
复制
已复制
复制
已复制
#include <unordered_map>
struct PremiumElements
struct PremiumElements
{
{
uint32 id;
uint32 id;
uint8 premium;
uint8 premium;
uint32 hp;
uint32 hp;
uint32 power_max;
uint32 power_max;
uint64 time;
uint64 time;
bool chat;
bool chat;
uint64 chat_time;
uint64 chat_time;
std::string last_message;
std::string last_message;
};
};
struct PremiumItemElements
struct PremiumItemElements
{
{
uint32 id;
uint32 id;
uint8 premium;
uint8 premium;
};
};
struct PremiumLocationElements
struct PremiumLocationElements
{
{
uint8 id;
uint8 id;
uint32 map_id;
uint32 map_id;
float x;
float x;
float y;
float y;
float z;
float z;
float o;
float o;
};
};
struct PremiumPlayerLocationElements
struct PremiumPlayerLocationElements
{
{
uint32 guid;
uint32 guid;
uint32 map_id;
uint32 map_id;
float x;
float x;
float y;
float y;
float z;
float z;
float o;
float o;
};
};
struct PremiumTeamLocationElements
struct PremiumTeamLocationElements
{
{
uint8 team;
uint8 team;
uint32 map_id;
uint32 map_id;
float x;
float x;
float y;
float y;
float z;
float z;
float o;
float o;
};
};
复制
已复制
复制
已复制
class
PREM
class
PremiumSystemMgr
{
{
复制
已复制
复制
已复制
private:
PremiumSystemMgr();
~PremiumSystemMgr();
public:
public:
复制
已复制
复制
已复制
PREM();
static PremiumSystemMgr* instance
();
~PREM
();
复制
已复制
复制
已复制
// Toolz
uint8 GetPremiumType() { return premiumType; }
static uint64 ConvertStringToNumber(std::string arg);
uint8 GetChatTeam() { return premiumChatTeam; }
static std::string ConvertNumberToString(uint64 numberX);
uint8 GetGMMinRank() { return premiumGMMinRank; }
float GetModifier() { return premiumMod; }
bool IsTimed() { return premiumTimerEnabled != 0; }
bool CanWaterBreathe() { return premiumWaterBreathe != 0; }
bool CanDecreaseSpellCost() { return premiumSpellCostDecrease != 0; }
bool IsItemsEnabled() { return premiumItemsEnabled != 0; }
bool IsTalentPointBonusEnabled() { return premiumTPEnabled != 0; }
bool IsHealthPointBonusEnabled() { return premiumHPEnabled != 0; }
bool IsManaPointBonusEnabled() { return premiumManaEnabled != 0; }
bool IsRagePointBonusEnabled() { return premiumRageEnabled != 0; }
uint64 GetDurationInSeconds() { return premiumTimerDuration; }
uint32 GetDurationInDays() { return ((((premiumTimerDuration) / 60) / 60) / 24); }
uint32 GetTalentPointBonus() { return premiumTPBonus; }
uint32 GetUpgradeItem() { return premiumUpgradeItem; }
uint32 GetTitleId() { return premiumTitleId; }
uint32 GetTitleMaskId() { return premiumTitleMaskId; }
uint32 GetChatDelay() { return premiumChatDelay; }
复制
已复制
复制
已复制
// Global Getterz
void SetPremiumType(uint8 v) { premiumType = v; }
static uint8 GetPremiumType();
void SetTimerEnabled(bool v) { premiumTimerEnabled = v; }
static float PREM::GetPremiumModifier();
void SetTimerDuration(uint64 v) { premiumTimerDuration *= v; }
static bool IsPremiumTimed();
void SetGMMinRank(uint8 v) { premiumGMMinRank = v; }
static bool CanWaterBreathe();
void SetItemEnabled(bool v) { premiumItemsEnabled = v; }
static bool CanDecreaseSpellCost();
void SetModifier(float v) { premiumMod = v; }
static uint64 GetPremiumDurationInSeconds();
void SetChatDelay(uint32 v) { premiumChatDelay = v; }
static uint32 GetPremiumDurationInDays();
void SetChatTeam(uint8 v) { premiumChatTeam = v; }
static bool IsPremiumItemsEnabled();
void SetTPEnabled(bool v) { premiumTPEnabled = v; }
static bool IsPremiumTalentPointBonusEnabled();
void SetTPBonus(uint32 v) { premiumTPBonus = v; }
static uint32 GetPremiumTalentPointBonus();
void SetHPEnabled(bool v) { premiumHPEnabled = v; }
static bool IsPremiumHealthPointBonusEnabled();
void SetManaEnabled(bool v) { premiumManaEnabled = v; }
static bool IsPremiumManaPointBonusEnabled();
void SetRageEnabled(bool v) { premiumRageEnabled = v; }
static bool IsPremiumRagePointBonusEnabled();
void SetTitleId(uint32 v) { premiumTitleId = v; }
static std::string GetAmountInString(uint32 amount);
void SetTitleMaskId(uint32 v) { premiumTitleMaskId = v; }
void SetWaterBreathe(uint8 v) { premiumWaterBreathe = v; }
void SetSpellCostDecrease(uint8 v) { premiumSpellCostDecrease = v; }
void SetUpgradeItem(uint32 v) { premiumUpgradeItem = v; }
复制
已复制
复制
已复制
// Player
Getterz
// Player
static
uint32 GetPlayerPremiumId(Player* player);
uint32 GetPlayerPremiumId(Player* player);
static bool IsPlayerPremium
(Player* player);
uint32 GetPlayerPremiumTimeInDays
(Player* player);
static void UpdatePlayerCustomHomeTeleport(
uint32
guid,
uint32
map_id, float x, float y, float z, float o
);
uint32 IncreaseValueWithModifier(Player* player,
uint32
value);
static
uint64 GetPlayerPremiumStartTimeInSeconds(Player* player);
uint32
DecreaseValueWithModifier(Player* player, uint32 value
);
static
uint64 GetPlayerPremiumRemainingTimeInSeconds(Player* player);
uint64 GetPlayerPremiumStartTimeInSeconds(Player* player);
static
std::string GetPlayerPremiumTimeLeftInString(Player* player);
uint64 GetPlayerPremiumRemainingTimeInSeconds(Player* player);
static uint32 GetPlayerPremiumTimeInDays
(Player* player);
std::string GetPlayerPremiumTimeLeftInString(Player* player);
static
void DepositGoldToPlayerGuildBank(Player* player, uint32 amount);
bool IsPlayerPremium
(Player* player);
static uint32 IncreaseValueWithModifier
(Player* player
, uint32 value
);
void UpdatePlayerCustomHomeTeleport(uint32 guid, uint32 map_id, float x, float y, float z, float o);
static uint32 DecreaseValueWithModifier
(Player* player
, uint
32
value
);
void DepositGoldToPlayerGuildBank(Player* player, uint32 amount);
void AddPremiumToPlayer
(Player* player
);
void RemovePremiumFromPlayer
(Player* player
);
void UpdatePlayerPremiumValue(Player* player
, uint
8
value
, uint64 time
);
复制
已复制
复制
已复制
// Player Setterz
// Item
static void AddPremiumToPlayer(Player* player);
bool IsItemPremium(Item* item);
static void RemovePremiumFromPlayer(Player* player);
void Update
Item
PremiumValue(
uint32 item_id
, uint8 value
);
static
void Update
Player
PremiumValue(
Player* player
, uint8 value
,
uint
64 time
);
void RemoveItem(
uint
32 id, Player* player
);
复制
已复制
复制
已复制
// Item Getters
// Misc
static bool IsItemPremium(Item* item);
void DeletePremium(Player* player);
// Item Setterz
uint64 ConvertStringToNumber(std::string arg);
static void UpdateItemPremiumValue(uint32 item_id, uint8 value);
std::string ConvertNumberToString(uint64 numberX);
std::string GetAmountInString(uint32 amount);
bool CheckIfPlayerInCombatOrDead(Player* player);
void TeleportPlayer(Player* player, uint8 id);
std::unordered_map<uint32, PremiumElements> Premium;
std::unordered_map<uint32, PremiumItemElements> PremiumItem;
std::unordered_map<uint32, PremiumLocationElements> PremiumLocations;
std::unordered_map<uint32, PremiumLocationElements> PremiumMallLocations;
std::unordered_map<uint32, PremiumLocationElements> PremiumPublicMallLocations;
std::unordered_map<uint32, PremiumPlayerLocationElements> PremiumPlayerLocations;
std::unordered_map<uint32, PremiumTeamLocationElements> PremiumTeamLocations;
private:
private:
复制
已复制
复制
已复制
// Tools
uint8 premiumType;
static bool CheckIfPlayerInCombatOrDead(Player* player);
uint8 premiumTimerEnabled;
static void TeleportPlayer(Player* player, uint8 id);
uint8 premiumItemsEnabled;
static void RemoveItem(uint32 id, Player* player);
uint8 premiumTPEnabled;
uint8 premiumHPEnabled;
uint8 premiumManaEnabled;
uint8 premiumRageEnabled;
uint8 premiumGMMinRank;
uint8 premiumChatTeam;
uint8 premiumWaterBreathe;
uint8 premiumSpellCostDecrease;
uint32 premiumTitleId;
uint32 premiumTitleMaskId;
uint32 premiumTPBonus;
uint32 premiumUpgradeItem;
uint32 premiumChatDelay;
uint64 premiumTimerDuration;
float premiumMod;
};
};
复制
已复制
复制
已复制
#define sPremiumSystemMgr PremiumSystemMgr::instance()
#endif
#endif
已保存差异
原始文本
打开文件
#ifndef PREMIUM_SYSTEM_H #define PREMIUM_SYSTEM_H struct PremiumElements { uint32 id; uint8 premium; uint32 hp; uint32 power_max; uint64 time; bool chat; uint64 chat_time; std::string last_message; }; struct PremiumItemElements { uint32 id; uint8 premium; }; struct PremiumLocationElements { uint8 id; uint32 map_id; float x; float y; float z; float o; }; struct PremiumPlayerLocationElements { uint32 guid; uint32 map_id; float x; float y; float z; float o; }; struct PremiumTeamLocationElements { uint8 team; uint32 map_id; float x; float y; float z; float o; }; class PREM { public: PREM(); ~PREM(); // Toolz static uint64 ConvertStringToNumber(std::string arg); static std::string ConvertNumberToString(uint64 numberX); // Global Getterz static uint8 GetPremiumType(); static float PREM::GetPremiumModifier(); static bool IsPremiumTimed(); static bool CanWaterBreathe(); static bool CanDecreaseSpellCost(); static uint64 GetPremiumDurationInSeconds(); static uint32 GetPremiumDurationInDays(); static bool IsPremiumItemsEnabled(); static bool IsPremiumTalentPointBonusEnabled(); static uint32 GetPremiumTalentPointBonus(); static bool IsPremiumHealthPointBonusEnabled(); static bool IsPremiumManaPointBonusEnabled(); static bool IsPremiumRagePointBonusEnabled(); static std::string GetAmountInString(uint32 amount); // Player Getterz static uint32 GetPlayerPremiumId(Player* player); static bool IsPlayerPremium(Player* player); static void UpdatePlayerCustomHomeTeleport(uint32 guid, uint32 map_id, float x, float y, float z, float o); static uint64 GetPlayerPremiumStartTimeInSeconds(Player* player); static uint64 GetPlayerPremiumRemainingTimeInSeconds(Player* player); static std::string GetPlayerPremiumTimeLeftInString(Player* player); static uint32 GetPlayerPremiumTimeInDays(Player* player); static void DepositGoldToPlayerGuildBank(Player* player, uint32 amount); static uint32 IncreaseValueWithModifier(Player* player, uint32 value); static uint32 DecreaseValueWithModifier(Player* player, uint32 value); // Player Setterz static void AddPremiumToPlayer(Player* player); static void RemovePremiumFromPlayer(Player* player); static void UpdatePlayerPremiumValue(Player* player, uint8 value, uint64 time); // Item Getters static bool IsItemPremium(Item* item); // Item Setterz static void UpdateItemPremiumValue(uint32 item_id, uint8 value); private: // Tools static bool CheckIfPlayerInCombatOrDead(Player* player); static void TeleportPlayer(Player* player, uint8 id); static void RemoveItem(uint32 id, Player* player); }; #endif
更改后文本
打开文件
#ifndef PREMIUM_SYSTEM_H #define PREMIUM_SYSTEM_H #include <unordered_map> struct PremiumElements { uint32 id; uint8 premium; uint32 hp; uint32 power_max; uint64 time; bool chat; uint64 chat_time; std::string last_message; }; struct PremiumItemElements { uint32 id; uint8 premium; }; struct PremiumLocationElements { uint8 id; uint32 map_id; float x; float y; float z; float o; }; struct PremiumPlayerLocationElements { uint32 guid; uint32 map_id; float x; float y; float z; float o; }; struct PremiumTeamLocationElements { uint8 team; uint32 map_id; float x; float y; float z; float o; }; class PremiumSystemMgr { private: PremiumSystemMgr(); ~PremiumSystemMgr(); public: static PremiumSystemMgr* instance(); uint8 GetPremiumType() { return premiumType; } uint8 GetChatTeam() { return premiumChatTeam; } uint8 GetGMMinRank() { return premiumGMMinRank; } float GetModifier() { return premiumMod; } bool IsTimed() { return premiumTimerEnabled != 0; } bool CanWaterBreathe() { return premiumWaterBreathe != 0; } bool CanDecreaseSpellCost() { return premiumSpellCostDecrease != 0; } bool IsItemsEnabled() { return premiumItemsEnabled != 0; } bool IsTalentPointBonusEnabled() { return premiumTPEnabled != 0; } bool IsHealthPointBonusEnabled() { return premiumHPEnabled != 0; } bool IsManaPointBonusEnabled() { return premiumManaEnabled != 0; } bool IsRagePointBonusEnabled() { return premiumRageEnabled != 0; } uint64 GetDurationInSeconds() { return premiumTimerDuration; } uint32 GetDurationInDays() { return ((((premiumTimerDuration) / 60) / 60) / 24); } uint32 GetTalentPointBonus() { return premiumTPBonus; } uint32 GetUpgradeItem() { return premiumUpgradeItem; } uint32 GetTitleId() { return premiumTitleId; } uint32 GetTitleMaskId() { return premiumTitleMaskId; } uint32 GetChatDelay() { return premiumChatDelay; } void SetPremiumType(uint8 v) { premiumType = v; } void SetTimerEnabled(bool v) { premiumTimerEnabled = v; } void SetTimerDuration(uint64 v) { premiumTimerDuration *= v; } void SetGMMinRank(uint8 v) { premiumGMMinRank = v; } void SetItemEnabled(bool v) { premiumItemsEnabled = v; } void SetModifier(float v) { premiumMod = v; } void SetChatDelay(uint32 v) { premiumChatDelay = v; } void SetChatTeam(uint8 v) { premiumChatTeam = v; } void SetTPEnabled(bool v) { premiumTPEnabled = v; } void SetTPBonus(uint32 v) { premiumTPBonus = v; } void SetHPEnabled(bool v) { premiumHPEnabled = v; } void SetManaEnabled(bool v) { premiumManaEnabled = v; } void SetRageEnabled(bool v) { premiumRageEnabled = v; } void SetTitleId(uint32 v) { premiumTitleId = v; } void SetTitleMaskId(uint32 v) { premiumTitleMaskId = v; } void SetWaterBreathe(uint8 v) { premiumWaterBreathe = v; } void SetSpellCostDecrease(uint8 v) { premiumSpellCostDecrease = v; } void SetUpgradeItem(uint32 v) { premiumUpgradeItem = v; } // Player uint32 GetPlayerPremiumId(Player* player); uint32 GetPlayerPremiumTimeInDays(Player* player); uint32 IncreaseValueWithModifier(Player* player, uint32 value); uint32 DecreaseValueWithModifier(Player* player, uint32 value); uint64 GetPlayerPremiumStartTimeInSeconds(Player* player); uint64 GetPlayerPremiumRemainingTimeInSeconds(Player* player); std::string GetPlayerPremiumTimeLeftInString(Player* player); bool IsPlayerPremium(Player* player); void UpdatePlayerCustomHomeTeleport(uint32 guid, uint32 map_id, float x, float y, float z, float o); void DepositGoldToPlayerGuildBank(Player* player, uint32 amount); void AddPremiumToPlayer(Player* player); void RemovePremiumFromPlayer(Player* player); void UpdatePlayerPremiumValue(Player* player, uint8 value, uint64 time); // Item bool IsItemPremium(Item* item); void UpdateItemPremiumValue(uint32 item_id, uint8 value); void RemoveItem(uint32 id, Player* player); // Misc void DeletePremium(Player* player); uint64 ConvertStringToNumber(std::string arg); std::string ConvertNumberToString(uint64 numberX); std::string GetAmountInString(uint32 amount); bool CheckIfPlayerInCombatOrDead(Player* player); void TeleportPlayer(Player* player, uint8 id); std::unordered_map<uint32, PremiumElements> Premium; std::unordered_map<uint32, PremiumItemElements> PremiumItem; std::unordered_map<uint32, PremiumLocationElements> PremiumLocations; std::unordered_map<uint32, PremiumLocationElements> PremiumMallLocations; std::unordered_map<uint32, PremiumLocationElements> PremiumPublicMallLocations; std::unordered_map<uint32, PremiumPlayerLocationElements> PremiumPlayerLocations; std::unordered_map<uint32, PremiumTeamLocationElements> PremiumTeamLocations; private: uint8 premiumType; uint8 premiumTimerEnabled; uint8 premiumItemsEnabled; uint8 premiumTPEnabled; uint8 premiumHPEnabled; uint8 premiumManaEnabled; uint8 premiumRageEnabled; uint8 premiumGMMinRank; uint8 premiumChatTeam; uint8 premiumWaterBreathe; uint8 premiumSpellCostDecrease; uint32 premiumTitleId; uint32 premiumTitleMaskId; uint32 premiumTPBonus; uint32 premiumUpgradeItem; uint32 premiumChatDelay; uint64 premiumTimerDuration; float premiumMod; }; #define sPremiumSystemMgr PremiumSystemMgr::instance() #endif
查找差异