mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fix mac build
This commit is contained in:
@@ -553,7 +553,7 @@ void LoginRESTService::ResponseCodePlugin::Destroy(soap* s, soap_plugin* p)
|
||||
delete data;
|
||||
}
|
||||
|
||||
int32 LoginRESTService::ResponseCodePlugin::ChangeResponse(soap* s, int32 originalResponse, size_t contentLength)
|
||||
int32 LoginRESTService::ResponseCodePlugin::ChangeResponse(soap* s, int32 originalResponse, uint64 contentLength)
|
||||
{
|
||||
ResponseCodePlugin* self = reinterpret_cast<ResponseCodePlugin*>(soap_lookup_plugin(s, PluginId));
|
||||
return self->fresponse(s, self->ErrorCode && originalResponse == SOAP_FILE ? self->ErrorCode : originalResponse, contentLength);
|
||||
|
||||
@@ -76,11 +76,11 @@ private:
|
||||
static int32 Init(soap* s, soap_plugin*, void*);
|
||||
static int32 Copy(soap* s, soap_plugin* dst, soap_plugin* src);
|
||||
static void Destroy(soap* s, soap_plugin* p);
|
||||
static int32 ChangeResponse(soap* s, int32 originalResponse, size_t contentLength);
|
||||
static int32 ChangeResponse(soap* s, int32 originalResponse, uint64 contentLength);
|
||||
|
||||
static ResponseCodePlugin* GetForClient(soap* s);
|
||||
|
||||
int32(*fresponse)(soap* s, int32 status, size_t length);
|
||||
int32(*fresponse)(soap* s, int32 status, uint64 length);
|
||||
int32 ErrorCode;
|
||||
};
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
GameObject* object = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(guidLow).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(*guidLow).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -312,12 +312,12 @@ public:
|
||||
|
||||
if (GameObject::DeleteFromDB(spawnId))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_DELOBJMESSAGE, std::to_string(spawnId).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_DELOBJMESSAGE, std::to_string(*spawnId).c_str());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(spawnId).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(*spawnId).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ public:
|
||||
GameObject* object = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(guidLow).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(*guidLow).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
GameObject* object = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(guidLow).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(*guidLow).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ public:
|
||||
GameObject* object = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(guidLow).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(*guidLow).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -579,7 +579,7 @@ public:
|
||||
GameObject* object = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(guidLow).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, std::to_string(*guidLow).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
CreatureData const* data = sObjectMgr->GetCreatureData(lowGuid);
|
||||
if (!data)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, std::to_string(lowGuid).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, std::to_string(*lowGuid).c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "Containers.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "EventMap.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "GameObject.h"
|
||||
@@ -735,18 +734,20 @@ public:
|
||||
|
||||
static uint32 CheerPicker()
|
||||
{
|
||||
uint32 newid = RAND(
|
||||
uint32 ids[] =
|
||||
{
|
||||
SOUND_CHEER_1,
|
||||
SOUND_CHEER_2,
|
||||
SOUND_CHEER_3,
|
||||
SOUND_CHEER_4
|
||||
);
|
||||
return newid;
|
||||
};
|
||||
return Trinity::Containers::SelectRandomContainerElement(ids);
|
||||
}
|
||||
|
||||
static uint32 FireworksPicker()
|
||||
{
|
||||
uint32 newid = RAND(
|
||||
uint32 ids[] =
|
||||
{
|
||||
FIREWORK_SHOW_TYPE_1_RED,
|
||||
FIREWORK_SHOW_TYPE_2_RED,
|
||||
FIREWORK_SHOW_TYPE_1_RED_BIG,
|
||||
@@ -770,13 +771,14 @@ public:
|
||||
FIREWORK_SHOW_TYPE_2_PURPLE,
|
||||
FIREWORK_SHOW_TYPE_1_PURPLE_BIG,
|
||||
FIREWORK_SHOW_TYPE_2_PURPLE_BIG
|
||||
);
|
||||
return newid;
|
||||
};
|
||||
return Trinity::Containers::SelectRandomContainerElement(ids);
|
||||
}
|
||||
|
||||
static uint32 FireworksBIGOnlyPicker()
|
||||
{
|
||||
uint32 newid = RAND(
|
||||
uint32 ids[] =
|
||||
{
|
||||
FIREWORK_SHOW_TYPE_1_RED_BIG,
|
||||
FIREWORK_SHOW_TYPE_2_RED_BIG,
|
||||
FIREWORK_SHOW_TYPE_1_BLUE_BIG,
|
||||
@@ -789,8 +791,8 @@ public:
|
||||
FIREWORK_SHOW_TYPE_2_YELLOW_BIG,
|
||||
FIREWORK_SHOW_TYPE_1_PURPLE_BIG,
|
||||
FIREWORK_SHOW_TYPE_2_PURPLE_BIG
|
||||
);
|
||||
return newid;
|
||||
};
|
||||
return Trinity::Containers::SelectRandomContainerElement(ids);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
Reference in New Issue
Block a user