diff --git a/includes/revision_nr.php b/includes/revision_nr.php index 51c864963..014956ec8 100644 --- a/includes/revision_nr.php +++ b/includes/revision_nr.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/tools/trinity_core/wowarmory_patch.patch b/tools/trinity_core/wowarmory_patch.patch index cbe084ec3..17fd02ba9 100644 --- a/tools/trinity_core/wowarmory_patch.patch +++ b/tools/trinity_core/wowarmory_patch.patch @@ -6,9 +6,7 @@ diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/A SendAchievementEarned(achievement); + /** World of Warcraft Armory **/ - + GetPlayer()->WriteWowArmoryDatabaseLog(1, achievement->ID); - + /** World of Warcraft Armory **/ CompletedAchievementData& ca = m_completedAchievements[achievement->ID]; ca.date = time(NULL); @@ -40,23 +38,14 @@ diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entiti CharacterDatabase.escape_string(sql_name); + /** World of Warcraft Armory **/ - + std::ostringstream ps; - + ps << "REPLACE INTO armory_character_stats (guid,data) VALUES ('" << GetGUIDLow() << "', '"; - + for(uint16 i = 0; i < m_valuesCount; ++i ) - + { - + ps << GetUInt32Value(i) << " "; - + } - + ps << "')"; - + CharacterDatabase.Execute( ps.str().c_str() ); - + /** World of Warcraft Armory **/ + std::ostringstream ss; @@ -68,61 +57,33 @@ diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entiti } + +/** World of Warcraft Armory **/ - +void Player::WriteWowArmoryDatabaseLog(uint32 type, uint32 data) - +{ - + uint32 pGuid = GetGUIDLow(); - + sLog->outDetail("WoWArmory: write feed log (guid: %u, type: %u, data: %u", pGuid, type, data); - + if (type <= 0) // Unknown type - + { - + sLog->outError("WoWArmory: unknown type id: %d, ignore.", type); - + return; - + } - + if (type == 3) // Do not write same bosses many times - just update counter. - + { - + uint8 Difficulty = GetMap()->GetDifficulty(); - + QueryResult result = CharacterDatabase.PQuery("SELECT counter FROM character_feed_log WHERE guid='%u' AND type=3 AND data='%u' AND difficulty='%u' LIMIT 1", pGuid, data, Difficulty); - + if (result) - + { - + CharacterDatabase.PExecute("UPDATE character_feed_log SET counter=counter+1, date=UNIX_TIMESTAMP(NOW()) WHERE guid='%u' AND type=3 AND data='%u' AND difficulty='%u' LIMIT 1", pGuid, data, Difficulty); - + } - + else - + { - + CharacterDatabase.PExecute("INSERT INTO character_feed_log (guid, type, data, date, counter, difficulty) VALUES('%u', '%d', '%u', UNIX_TIMESTAMP(NOW()), 1, '%u')", pGuid, type, data, Difficulty); - + } - + } - + else - + { - + CharacterDatabase.PExecute("REPLACE INTO character_feed_log (guid, type, data, date, counter) VALUES('%u', '%d', '%u', UNIX_TIMESTAMP(NOW()), 1)", pGuid, type, data); - + } - +} - +/** World of Warcraft Armory **/ \ No newline at end of file diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h @@ -133,7 +94,6 @@ diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities WorldLocation GetStartPosition() const; + /** World of Warcraft Armory **/ - + void WriteWowArmoryDatabaseLog(uint32 type, uint32 data); // currently visible objects at player client @@ -148,9 +108,7 @@ diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/U - ((InstanceMap *)m)->PermBindAllPlayers(creditedPlayer); + { + /** World of Warcraft Armory **/ - + creditedPlayer->WriteWowArmoryDatabaseLog(3, creature->GetCreatureInfo()->Entry); - + /** World of Warcraft Armory **/ + } }