Jump to content

Shadez WowArmory and GetGUID() issues


cyb1n
 Share

Recommended Posts

I'm still fairly new to C++ development, I know enough about programming in general to solve most problems but I'm having some trouble finding the information to resolve this issue.

It appears that WowArmory has fallen by the wayside long enough that it is not up-to-date with MaNGOS at the moment. I've done all the manually patching that is required (copy and paste from the .patch files provided by Shadez into MaNGOS core) and when it comes down to compiling I receive a single error:

[== C++ ==]
error C2039: 'GetGUID' : is not a member of 'Player'

From researching the error I've picked up on the fact that the core now uses ObjectGUID() and GetObjectGUID() instead of GetGUID(). Unfortunately, any topics pertaining specifically to WowArmory have lead to a dead end. I've tried simply changing GetGUID() to GetObjectGUID() only to receive a similar error.

Has anyone had any experience with this and been able to fix it? Or simply knows what I should replace GetGUID() with to resolve the error? Any assistance will be very much appreciated.

(below is the full block of code causing the problem)

[== C++ ==]
           /** World of Warcraft Armory **/
           uint32 maxChartID;
           QueryResult *result = CharacterDatabase.PQuery("SELECT MAX(gameid) FROM armory_game_chart");
           if(!result)
               maxChartID = 0;
           else
           {
               maxChartID = (*result)[0].GetUInt32();
               delete result;
           }
           uint32 gameID = maxChartID+1;
           for(BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
           {
               Player *plr = sObjectMgr.GetPlayer(itr->first);
               if (!plr)
                   continue;
               uint32 plTeamID = plr->GetArenaTeamId(winner_arena_team->GetSlot());
               int changeType;
               uint32 resultRating;
               uint32 resultTeamID;
               int32 ratingChange;
               if (plTeamID == winner_arena_team->GetId())
               {
                   changeType = 1; //win
                   resultRating = winner_rating;
                   resultTeamID = plTeamID;
                   ratingChange = winner_change;
               }
               else
               {
                   changeType = 2; //lose
                   resultRating = loser_rating;
                   resultTeamID = loser_arena_team->GetId();
                   ratingChange = loser_change;
               }
               std::ostringstream sql_query;
               //                                                        gameid,              teamid,                     guid,                    changeType,             ratingChange,               teamRating,                  damageDone,                          deaths,                          healingDone,                           damageTaken,                           healingTaken,                         killingBlows,                      mapId,                 start,                   end
               sql_query << "INSERT INTO armory_game_chart VALUES
('" << gameID << "', '" << resultTeamID << "', '" << plr->GetObjectGUID() << "', '" << changeType << "', '" << ratingChange  << "', '" << resultRating << "', '" << itr->second->DamageDone << "', '" << itr->second->Deaths << "', '" << itr->second->HealingDone << "', '" << itr->second->DamageTaken << "', '" << itr->second->HealingTaken << "', '" << itr->second->KillingBlows << "', '" << m_MapId << "', '" << m_StartTime << "', '" << m_EndTime << "')";
               CharacterDatabase.Execute(sql_query.str().c_str());
           }
           /** World of Warcraft Armory **/

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use