[SOLVED]Wowarmory

I am trying to get wowarmory working by manually applying the edits in this patch:

[/URL][URL=“https://github.com/Seejayz/WorldofwarcraftArmory/blob/master/tools/Armory.patch”]WorldofwarcraftArmory/tools/Armory.patch at master · Seejayz/WorldofwarcraftArmory · GitHub

when i try to compile, this section in player.cpp is kicking back an error:


diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp

index 1fa88ce..78b6e63 100755

--- a/src/server/game/Entities/Player/Player.cpp

+++ b/src/server/game/Entities/Player/Player.cpp

@@ -25515,6 +25550,47 @@ void Player::_SaveInstanceTimeRestrictions(SQLTransaction& trans)

	 }

}


+/** World of Warcraft Armory **/

+void Player::InitWowarmoryFeeds() {

+    // Clear feeds

+    m_wowarmory_feeds.clear();

+}

+

+void Player::CreateWowarmoryFeed(uint32 type, uint32 data, uint32 item_guid, uint32 item_quality) {

+    /*

+	    1 - TYPE_ACHIEVEMENT_FEED

+	    2 - TYPE_ITEM_FEED

+	    3 - TYPE_BOSS_FEED

+    */

+    if (GetGUIDLow() == 0)

+    {

+	    sLog->outError("[Wowarmory]: player is not initialized, unable to create log entry!");

+	    return;

+    }

+    if (type <= 0 || type > 3)

+    {

+	    sLog->outError("[Wowarmory]: unknown feed type: %d, ignore.", type);

+	    return;

+    }

+    if (data == 0)

+    {

+	    sLog->outError("[Wowarmory]: empty data (GUID: %u), ignore.", GetGUIDLow());

+	    return;

+    }

+    WowarmoryFeedEntry feed;

+    feed.guid = GetGUIDLow();

+    feed.type = type;

+    feed.data = data;

+    feed.difficulty = type == 3 ? GetMap()->GetDifficulty() : 0;

+    feed.item_guid  = item_guid;

+    feed.item_quality = item_quality;

+    feed.counter = 0;

+    feed.date = time(NULL);

+    sLog->outDebug(LOG_FILTER_UNITS, "[Wowarmory]: create wowarmory feed (GUID: %u, type: %d, data: %u).", feed.guid, feed.type, feed.data);

+    m_wowarmory_feeds.push_back(feed);

+}

+/** World of Warcraft Armory **/

+

bool Player::IsInWhisperWhiteList(uint64 guid)

{

	 for (WhisperListContainer::const_iterator itr = WhisperList.begin(); itr != WhisperList.end(); ++itr)

Here’s a screenshot of the error:

[ATTACH]568._xfImport[/ATTACH]

If I remove these lines from the patch, the error goes away:


if (GetGUIDLow() == 0)

    {

	    sLog->outError("[Wowarmory]: player is not initialized, unable to create log entry!");

	    return;

    }

    if (type <= 0 || type > 3)

    {

	    sLog->outError("[Wowarmory]: unknown feed type: %d, ignore.", type);

	    return;

    }

    if (data == 0)

    {

	    sLog->outError("[Wowarmory]: empty data (GUID: %u), ignore.", GetGUIDLow());

	    return;

    }

But obviously that’s not a good idea…

Any Ideas? Thank you in advance!

I think next way will be good:

sLog->outInfo(LOG_FILTER_TSCR,[SIZE=10px][FONT=‘DejaVu Sans Mono’] [/FONT][/SIZE][SIZE=10px]"[Wowarmory]:…);[/SIZE]

So like this? :


    if (GetGUIDLow() == 0)

    {

	    sLog->outInfo(LOG_FILTER_TSCR,"[Wowarmory]: player is not initialized, unable to create log entry!");

	    return;

    }

    if (type <= 0 || type > 3)

    {

	    sLog->outInfo(LOG_FILTER_TSCR,"[Wowarmory]: unknown feed type: %d, ignore.", type);

	    return;

    }

    if (data == 0)

    {

	    sLog->outInfo(LOG_FILTER_TSCR,"[Wowarmory]: empty data (GUID: %u), ignore.", GetGUIDLow());

	    return;

    }

Yes

For me work perfectly

Thank you, it compiled fine, guess that wasnt why my achievements arent showing up on the armory afterall =(

— Canned message start —

It appears the issue in the original post was solved, so this thread shall be closed.

Should you encounter any other difficulties, please open a new thread.

— Canned message end —