Nephyr
Members-
Posts
20 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Nephyr's Achievements
Member (2/3)
0
Reputation
-
Possible temp-fix (trinity based) for some sql problem: * Guild-Bank items * Search page * Characters (specially dk and rogue) * Arena ladder (in some case) * And other dependencies... diff --git a/includes/classes/class.characters.php b/includes/classes/class.characters.php index 65988ac..6f14231 100644 --- a/includes/classes/class.characters.php +++ b/includes/classes/class.characters.php @@ -3043,21 +3043,25 @@ Class Characters { ); break; case SERVER_TRINITY: - $talent_spells = Armory::$aDB->selectRow("SELECT `Rank_1`, `Rank_3`, `Rank_4`, `Rank_4`, `Rank_5` FROM `ARMORYDBPREFIX_talents` WHERE `TalentID` = %d LIMIT 1", $talent_id); - if(!$talent_spells || ($rank >= 0 && !isset($talent_spells['Rank_' . $rank + 1]))) { + $talent_spells = Armory::$aDB->selectRow("SELECT `Rank_1`, `Rank_2`, `Rank_3`, `Rank_4`, `Rank_5` FROM `ARMORYDBPREFIX_talents` WHERE `TalentID` = %d LIMIT 1", $talent_id); + + if(!$talent_spells || ($rank+1 >= 0 && !isset($talent_spells['Rank_' . $rank + 1]))) { Armory::Log()->writeError('%s : talent ranks for talent %d was not found in DB!', __METHOD__, $talent_id); return false; } - $sql_data = array( - 'activeSpec' => array( - sprintf('SELECT `spell` FROM `character_talent` WHERE `spell` IN (%s) AND `guid`=%%d AND `spec`=%%d', array($talent_spells['Rank_1'], $talent_spells['Rank_2'], $talent_spells['Rank_3'], $talent_spells['Rank_4'], $talent_spells['Rank_5'])), - sprintf('SELECT 1 FROM `character_talent` WHERE `spell`=%d AND `guid`=%%d AND `spec`=%%d'. $talent_spells['Rank_' . $rank + 1]) - ), - 'spec' => array( - sprintf('SELECT `spell` FROM `character_talent` WHERE `spell` IN (%s) AND `guid`=%%d', array($talent_spells['Rank_1'], $talent_spells['Rank_2'], $talent_spells['Rank_3'], $talent_spells['Rank_4'], $talent_spells['Rank_5'])), - sprintf('SELECT 1 FROM `character_talent` WHERE `spell`=%d AND `guid`=%%d', $talent_spells['Rank_' . $rank + 1]) - ) - ); + else + { + $sql_data = array( + 'activeSpec' => array( + sprintf('SELECT `spell` FROM `character_talent` WHERE `spell` IN (%s) AND `guid`=%%d AND `spec`=%%d', implode(",", array($talent_spells['Rank_1'], $talent_spells['Rank_2'], $talent_spells['Rank_3'], $talent_spells['Rank_4'], $talent_spells['Rank_5']))), + sprintf('SELECT 1 FROM `character_talent` WHERE `spell`=%d AND `guid`=%%d AND `spec`=%%d'. $talent_spells['Rank_' . $rank + 1]) + ), + 'spec' => array( + sprintf('SELECT `spell` FROM `character_talent` WHERE `spell` IN (%s) AND `guid`=%%d', implode(",", array($talent_spells['Rank_1'], $talent_spells['Rank_2'], $talent_spells['Rank_3'], $talent_spells['Rank_4'], $talent_spells['Rank_5']))), + sprintf('SELECT 1 FROM `character_talent` WHERE `spell`=%d AND `guid`=%%d', $talent_spells['Rank_' . $rank + 1]) + ) + ); + } break; default: Armory::Log()->writeError('%s : unknown server type %d!', __METHOD__, $this->GetServerType()); diff --git a/includes/classes/class.guilds.php b/includes/classes/class.guilds.php index 7a3c92c..ad6f01a 100644 --- a/includes/classes/class.guilds.php +++ b/includes/classes/class.guilds.php @@ -293,7 +293,7 @@ Class Guilds { Armory::Log()->writeError('%s : guildId not defined', __METHOD__); return false; } - $items_list = Armory::$cDB->select("SELECT `item_entry` AS `id`, `item_guid` AS `seed`, `SlotId` AS `slot`, `TabId` AS `bag` FROM `guild_bank_item` WHERE `guildid`=%d", $this->guildId); + $items_list = Armory::$cDB->select("SELECT b.itementry AS `id`, `item_guid` AS `seed`, `SlotId` AS `slot`, `TabId` AS `bag` FROM `guild_bank_item` AS a INNER JOIN `item_instance` AS b ON(a.item_guid = b.guid) WHERE `guildid`=%d", $this->guildId); $count_items = count($items_list); for($i = 0; $i < $count_items; $i++) { $item_data = Armory::$wDB->selectRow("SELECT `RandomProperty`, `RandomSuffix` FROM `item_template` WHERE `entry` = %d LIMIT 1", $items_list[$i]['id']); diff --git a/includes/classes/class.items.php b/includes/classes/class.items.php index 81aad59..23917e2 100644 --- a/includes/classes/class.items.php +++ b/includes/classes/class.items.php @@ -3020,7 +3020,7 @@ Class Items { * @return int **/ public function GetItemEntryByGUID($item_guid) { - return Armory::$cDB->selectCell("SELECT `item_template` FROM `character_inventory` WHERE `item`=%d", $item_guid); + return Armory::$cDB->selectCell("SELECT `item` FROM `character_inventory` WHERE `item`=%d", $item_guid); } /** diff --git a/includes/classes/class.search.php b/includes/classes/class.search.php index dd0b73a..3e8aa17 100644 --- a/includes/classes/class.search.php +++ b/includes/classes/class.search.php @@ -405,7 +405,7 @@ Class SearchMgr { foreach($tmp_icons_holder as $icon) { $icons_holder[$icon['displayid']] = $icon['icon']; } - $tmp_names_holder = Armory::$wDB->select("SELECT `entry`, `name_loc%d` AS `name` FROM `locales_item` WHERE `entry` IN (%s)", Armory::GetLoc(), $names_to_add); + $tmp_names_holder = Armory::$wDB->select("SELECT `entry`, `name_loc%d` AS `name` FROM `locales_item` WHERE `entry` IN (%s)", Armory::GetLoc()+1, $names_to_add); foreach($tmp_names_holder as $name) { if($name['name'] == null) { $name['name'] = Items::GetItemName($name['entry']); Column loc0 is not exists (en_gb tested) Armory::GetLoc()+1
-
It's true! into rev. 394 the "armory_loader.php" is already fixed. Damned program (TortoiseGit)!!
-
-------------------------------------------------------------- POSSIBLE - FIX (armory_loader.php), Rev. 394 -------------------------------------------------------------- [color="darkred"]- $utils = new Utils;[/color] [color="green"]+ $utils = new Utils($armory);[/color] ... [color="darkred"] - $characters = new Characters;[/color] [color="green"]+ $characters = new Characters($armory);[/color] ... [color="darkred"]- $guilds = new Guilds;[/color] [color="green"]+ $guilds = new Guilds($armory);[/color] ... [color="darkred"] - $items = new Items;[/color] [color="green"]+ $items = new Items($armory);[/color] ... [color="darkred"]- $mangos = new Mangos;[/color] [color="green"]+ $mangos = new Mangos($armory);[/color] ... [color="darkred"]- $arenateams = new Arenateams;[/color] [color="green"]+ $arenateams = new Arenateams($armory);[/color] ... [color="darkred"]- $search = new SearchMgr;[/color] [color="green"]+ $search = new SearchMgr($armory);[/color] -------------------------------------------------------------- POSSIBLE - FIX (arena-team-game-chart.php), Rev. 394 -------------------------------------------------------------- [color="darkred"]- $arenateams->_initTeam();[/color] [color="green"]+ $arenateams->InitTeam();[/color]
-
Check your configs.
-
Check and rechecks the data in the configuration file. If you use an account dedicated to the armory check if the account has all permissions.
-
Some DBMS require to select a default scheme (such as: realmd, characters, ecc...) Try to add at start of file: [b]USE[i] database_name[/i];[/b] (such as: USE characters;) INSERT INTO..... INSERT INTO..... INSERT INTO..... INSERT INTO.....
-
Revision 9708 is an experimental version, not stable!!! That revision is for only developers and modders. Infact you must create a solution file with cmakes and contains 20 projects instead 12.
-
what revision of trinitycore2 do you use? PS: i tried the patch on Revision 9174 of TrinityCore2
-
--------------------------------------------------------------------- FIX - Patch-Emulator: TrinityCore2 File Target: wowarmory_arena_chart.patch --------------------------------------------------------------------- [color="Gray"]diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -738,6 +738,47 @@ SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loser_change); SetArenaMatchmakerRating(winner, winner_matchmaker_rating); SetArenaMatchmakerRating(GetOtherTeam(winner), loser_matchmaker_rating); + /** World of Warcraft Armory **/ + uint32 maxChartID; + QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT MAX(gameid) FROM armory_game_chart"); + if(!result) + maxChartID = 0; + else + { + maxChartID = (*result)[0].GetUInt32(); [color="DarkRed"]+ delete result;[/color] [color="Green"]+ result.release();[/color] + } + uint32 gameID = maxChartID+1; [color="DarkRed"]+ for(BattlegroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)[/color] [color="Green"]+ for(BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)[/color] + {[color="DarkRed"] + Player *plr = sObjectMgr.GetPlayer(itr->first);[/color][color="Green"] + Player *plr = objmgr.GetPlayer(itr->first);[/color] + 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->GetGUID() << "', '" << 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 **/ sLog.outArena("Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. RatingChange: %i.", m_ArenaType, m_ArenaTeamIds[bG_TEAM_ALLIANCE], m_ArenaTeamIds[bG_TEAM_HORDE], winner_arena_team->GetId(), winner_change); } else @@ -1344,6 +1385,14 @@ case SCORE_HEALING_DONE: // Healing Done itr->second->HealingDone += value; break; + /** World of Warcraft Armory **/ + case SCORE_DAMAGE_TAKEN: + itr->second->DamageTaken += value; // Damage Taken + break; + case SCORE_HEALING_TAKEN: + itr->second->HealingTaken += value; // Healing Taken + break; + /** World of Warcraft Armory **/ default: sLog.outError("Battleground: Unknown player score type %u", type); break; diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -210,7 +210,11 @@ SCORE_SECONDARY_OBJECTIVES = 17, //SOTA SCORE_DESTROYED_DEMOLISHER = 18, - SCORE_DESTROYED_WALL = 19 + SCORE_DESTROYED_WALL = 19, + /** World of Warcraft Armory **/ + SCORE_DAMAGE_TAKEN = 20, + SCORE_HEALING_TAKEN = 21 + /** World of Warcraft Armory **/ }; enum ArenaType @@ -302,6 +306,10 @@ uint32 BonusHonor; uint32 DamageDone; uint32 HealingDone; + /** World of Warcraft Armory **/ + uint32 DamageTaken; + uint32 HealingTaken; + /** World of Warcraft Armory **/ }; enum BGHonorMode diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -693,6 +693,10 @@ { // FIXME: kept by compatibility. don't know in BG if the restriction apply. bg->UpdatePlayerScore(killer, SCORE_DAMAGE_DONE, damage); + /** World of Warcraft Armory **/ [color="DarkRed"]+ if (Battleground *bgV = ((Player*)pVictim)->GetBattleground())[/color] [color="Green"]+ if (BattleGround *bgV = ((Player*)pVictim)->GetBattleGround())[/color] + bgV->UpdatePlayerScore(((Player*)pVictim), SCORE_DAMAGE_TAKEN, damage); + /** World of Warcraft Armory **/ } } @@ -9939,6 +9943,10 @@ { pVictim->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_HEALING_RECEIVED, gain); pVictim->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED, addhealth); + /** World of Warcraft Armory **/ [color="DarkRed"]+ if (Battleground *bgV = pVictim->ToPlayer()->GetBattleground())[/color] [color="Green"]+ if (BattleGround *bgV = pVictim->ToPlayer()->GetBattleGround())[/color] + bgV->UpdatePlayerScore((Player*)pVictim, SCORE_HEALING_TAKEN, gain); + /** World of Warcraft Armory **/ } return gain; [/color] Try...
-
Download Shadez-Armory. Modify character-select (add change pwd and exp.). Recovery pwd is possible with hash and validating mail.
-
attach a screen error if you can (if you had a permission of owner).
-
So, just to understand, if I place a link to my site is not punishable because i had permission from the owner (me or work group), right??
-
This will limit the communication channels between users. Moderators should consider the nature and context of a link in my opinion.
-
[ Work in progress - C# ] Into my project "WoW Launcher"... I have think to integrate an anti-hack system in this way i can check if the player uses hack without error (it checks running processes). 1. Launcher -> connect() 2. Various checks 3. Server -> send() -------------------------------------------------------------------------------------------[ Loop ] 4. Launcher checks periodically the running processes (warden logic) -------------------------------------------------------------------------------------------[ Loop ] 5. Hack found -> send message 6. Server -> SOAP [kick / ban]
-
Like this :: http://img825.imageshack.us/img825/567/cellardoorarmory.jpg This is my revision of shadez armory.
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®