Code Changes from Trinity Core ?

std::string getPlayerStatus(uint32 guid) {
Player *player = sObjectAccessor->FindPlayer(guid);
return “Offline”;
return "Online, " + player->isAFK();
return "Online, " + player->isDND();
return “Online”;

What is the new way to make it possible ?

/opt/WoW/Core/src/server/scripts/Custom/Arena_Ranks.cpp: In member function ‘std::string ArenaTeamRanks::getPlayerStatus(uint32)’:

/opt/WoW/Core/src/server/scripts/Custom/Arena_Ranks.cpp:105:62: error: no matching function for call to ‘ObjectAccessor::FindPlayer(uint32&)’
/opt/WoW/Core/src/server/scripts/Custom/Arena_Ranks.cpp:105:62: note: candidate is:
In file included from /opt/WoW/Core/src/server/game/Globals/ObjectMgr.h:36:0,
from /opt/WoW/Core/src/server/game/Spells/Spell.h:24,
from /opt/WoW/Core/src/server/game/Grids/Notifiers/GridNotifiers.h:33,
from PrecompiledHeaders/ScriptPCH.h:12:
/opt/WoW/Core/src/server/game/Globals/ObjectAccessor.h:167:24: note: static Player* ObjectAccessor::FindPlayer(ObjectGuid)
/opt/WoW/Core/src/server/game/Globals/ObjectAccessor.h:167:24: note: no known conversion for argument 1 from ‘uint32 {aka unsigned int}’ to ‘ObjectGuid’
make[2]: *** [src/server/scripts/CMakeFiles/scripts.dir/Custom/Arena_Ranks.cpp.o] Error 1
make[1]: *** [src/server/scripts/CMakeFiles/scripts.dir/all] Error 2
make: *** [all] Error 2


/opt/WoW/Core/src/server/scripts/Custom/donornpc.cpp:28:394: error: cannot pass objects of non-trivially-copyable type ‘const string {aka const class std::basic_string}’ through ‘…’

LoginDatabase.PQuery(“INSERT INTO auth.donation_purchases (account_id, character_name, character_guid, donation_item_id, donation_item_name, donation_item_amount, date) VALUES (‘%u’, ‘%s’, ‘%u’, ‘%u’, ‘%s’, ‘%u’, DATE_FORMAT(date, ‘%s’))”, player->GetSession()->GetAccountId(), player->GetName(), player->GetGUIDLow(), item, itemTemplate->Name1.c_str(), count, DateTime.c_str());

How can i fix it ?

player[COLOR=rgb(102,102,0)]->[COLOR=rgb(102,0,102)]GetNameCOLOR=rgb(102,102,0) to player[COLOR=rgb(102,102,0)]->[COLOR=rgb(102,0,102)]GetNameCOLOR=rgb(102,102,0).c_str()

It works, but i think my SQL Query is not okay, !

They add all into the Database but not the DataTime set and i have an duplicate warning into the serverwindow…

(Account: 1) X: 16217.928711 Y: 16248.501953 Z: 12.138331 Map: 1 (Kalimdor) Area: 876 (GM Island) Zone: Unknown Selected: Donor Vendor (GUID Full: 0xf13000c35103454f Type: Creature Entry: 50001 Low: 214351)]

[1062] Duplicate entry ‘1’ for key ‘PRIMARY’

[1062] Duplicate entry ‘1’ for key ‘PRIMARY’

[1062] Duplicate entry ‘1’ for key ‘PRIMARY’

[1062] Duplicate entry ‘1’ for key ‘PRIMARY’