diff --git a/guild-bank-contents.php b/guild-bank-contents.php index 79f35e635..2b875e96d 100644 --- a/guild-bank-contents.php +++ b/guild-bank-contents.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 365 + * @revision 400 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -26,6 +26,7 @@ define('load_characters_class', true); define('load_guilds_class', true); define('load_items_class', true); +define('load_item_class', true); if(!@include('includes/armory_loader.php')) { die('Fatal error: unable to load system files.'); } diff --git a/includes/classes/class.guilds.php b/includes/classes/class.guilds.php index 362fb8aa7..76d1c2f35 100644 --- a/includes/classes/class.guilds.php +++ b/includes/classes/class.guilds.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 396 + * @revision 400 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -286,7 +286,9 @@ public function BuildGuildBankItemList() { } $items_list = $this->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); $count_items = count($items_list); - for($i=0;$i<$count_items;$i++) { + for($i = 0; $i < $count_items; $i++) { + $m_server = Utils::GetServerTypeByString($this->armory->currentRealmInfo['type']); + $item_data = $this->armory->wDB->selectRow("SELECT `RandomProperty`, `RandomSuffix` FROM `item_template` WHERE `entry` = %d LIMIT 1", $items_list[$i]['id']); $tmp_durability = Items::GetItemDurabilityByItemGuid($items_list[$i]['seed']); $items_list[$i]['durability'] = (int) $tmp_durability['current']; $items_list[$i]['maxDurability'] = (int) $tmp_durability['max']; @@ -300,7 +302,8 @@ public function BuildGuildBankItemList() { elseif($this->armory->currentRealmInfo['type'] == 'trinity') { $items_list[$i]['quantity'] = $this->armory->cDB->selectCell("SELECT `count` FROM `item_instance` WHERE `guid`=%d", $items_list[$i]['seed']); } - $items_list[$i]['randomPropertiesId'] = Items::GetRandomPropertiesData($items_list[$i]['id'], 0, $items_list[$i]['seed'], true); + //TODO: Find correct random property/suffix for items in guild vault. + $items_list[$i]['randomPropertiesId'] = Items::GetRandomPropertiesData($items_list[$i]['id'], 0, $items_list[$i]['seed'], true, $m_server, null, $item_data); $tmp_classinfo = Items::GetItemSubTypeInfo($items_list[$i]['id']); $items_list[$i]['subtype'] = ''; $items_list[$i]['subtypeLoc'] = $tmp_classinfo['subclass_name']; diff --git a/includes/classes/class.item.php b/includes/classes/class.item.php index c00320f83..80b6030a0 100644 --- a/includes/classes/class.item.php +++ b/includes/classes/class.item.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 398 + * @revision 400 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -331,6 +331,9 @@ public function GetSkill() { } } + /** + * @return int + **/ public function GetCurrentDurability() { if($this->m_server == SERVER_MANGOS) { return $this->GetUInt32Value(ITEM_FIELD_DURABILITY); @@ -342,6 +345,9 @@ public function GetCurrentDurability() { return 0; } + /** + * @return int + **/ public function GetMaxDurability() { if($this->m_server == SERVER_MANGOS) { return $this->GetUInt32Value(ITEM_FIELD_MAXDURABILITY); @@ -349,6 +355,7 @@ public function GetMaxDurability() { elseif($this->m_server == SERVER_TRINITY) { return $this->tc_data['maxdurability']; // assigned in Item::LoadFromDB() } + $this->armory->Log()->writeLog('%s : wrong server type', __METHOD__); return 0; } @@ -358,6 +365,21 @@ public function GetMaxDurability() { public function GetItemDurability() { return array('current' => $this->GetCurrentDurability(), 'max' => $this->GetMaxDurability()); } + + /** + * @return array + **/ + public function GetRandomSuffixData() { + if($this->m_server != SERVER_MANGOS) { + $this->armory->Log()->writeError('%s : this method is usable with MaNGOS servers only.', __METHOD__); + return false; + } + return array( + $this->GetUInt32Value(ITEM_FIELD_ENCHANTMENT_8_1), + $this->GetUInt32Value(ITEM_FIELD_ENCHANTMENT_9_1), + $this->GetUInt32Value(ITEM_FIELD_ENCHANTMENT_10_1) + ); + } } ?> \ No newline at end of file diff --git a/includes/classes/class.itemprototype.php b/includes/classes/class.itemprototype.php index 9054d335d..a8902305a 100644 --- a/includes/classes/class.itemprototype.php +++ b/includes/classes/class.itemprototype.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 398 + * @revision 400 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -287,6 +287,21 @@ public function getDPS() { } return $temp * 500 / $this->delay; } + + // Not used now. + public function GetItemQualityColor() { + $colors_array = array( + '#c9c9c9', //GREY + '#ffffff', //WHITE + '#00FF00', //GREEN + '#0070DD', //BLUE + '#A335EE', //PURPLE + '#ff8000', //ORANGE + '#7e7046', //LIGHT YELLOW + '#7e7046' //LIGHT YELLOW + ); + return (isset($colors_array[$this->Quality])) ? $colors_array[$this->Quality] : $colors_array[1]; + } } ?> \ No newline at end of file diff --git a/includes/classes/class.items.php b/includes/classes/class.items.php index efe8d6457..4151fb150 100644 --- a/includes/classes/class.items.php +++ b/includes/classes/class.items.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 398 + * @revision 400 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -1299,20 +1299,48 @@ public function GetModelSuffix($name) { * @param int $item_guid * @return array **/ - public function GetRandomPropertiesData($item_entry, $owner_guid, $item_guid = 0, $rIdOnly = false) { + public function GetRandomPropertiesData($item_entry, $owner_guid, $item_guid = 0, $rIdOnly = false, $serverType = 1, $item = null, $item_data = null) { + // I have no idea how it works but it works :D + // Do not touch anything in this method (at least until somebody will explain me what the fuck am I did here). $enchId = 0; - switch($this->armory->currentRealmInfo['type']) { - case 'mangos': + $use = 'property'; + switch($serverType) { + case SERVER_MANGOS: if($item_guid > 0) { - $enchId = self::GetItemDataField(ITEM_FIELD_RANDOM_PROPERTIES_ID, 0, $owner_guid, $item_guid); + if(is_object($item) && $item->IsCorrect()) { + if(is_array($item_data) && $item_data['RandomProperty'] > 0) { + $enchId = $item->GetItemRandomPropertyId(); + } + elseif(is_array($item_data) && $item_data['RandomSuffix'] > 0) { + $suffix_enchants = $item->GetRandomSuffixData(); + if(!is_array($suffix_enchants) || !isset($suffix_enchants[0]) || $suffix_enchants[0] == 0) { + $this->armory->Log()->writeError('%s : suffix_enchants not found', __METHOD__); + return false; + } + $enchId = $this->armory->aDB->selectCell("SELECT `id` FROM `ARMORYDBPREFIX_randomsuffix` WHERE `ench_1` = %d AND `ench_2` = %d AND `ench_3` = %d LIMIT 1", $suffix_enchants[0], $suffix_enchants[1], $suffix_enchants[2]); + $use = 'suffix'; + } + } + else { + $enchId = self::GetItemDataField(ITEM_FIELD_RANDOM_PROPERTIES_ID, 0, $owner_guid, $item_guid); + } } else { $enchId = self::GetItemDataField(ITEM_FIELD_RANDOM_PROPERTIES_ID, $item_entry, $owner_guid); } break; - case 'trinity': + case SERVER_TRINITY: if($item_guid > 0) { - $enchId = $this->armory->cDB->selectCell("SELECT `randomPropertyId` FROM `item_instance` WHERE `guid`=%d", $item_guid); + if(is_object($item) && $item->IsCorrect()) { + $enchId = $item->GetItemRandomPropertyId(); + if($enchId < 0) { + $use = 'suffix'; + $enchId = abs($enchId); + } + } + else { + $enchId = $this->armory->cDB->selectCell("SELECT `randomPropertyId` FROM `item_instance` WHERE `guid`=%d", $item_guid); + } } else { $item_guid = self::GetItemGUIDByEntry($item_entry, $owner_guid); @@ -1323,17 +1351,47 @@ public function GetRandomPropertiesData($item_entry, $owner_guid, $item_guid = 0 if($rIdOnly == true) { return $enchId; } - $rand_data = $this->armory->aDB->selectRow("SELECT `name_%s` AS `name`, `ench_1`, `ench_2`, `ench_3` FROM `ARMORYDBPREFIX_randomproperties` WHERE `id`=%d", $this->armory->GetLocale(), $enchId); - if(!$rand_data) { - $this->armory->Log()->writeLog('%s : unable to get rand_data FROM `ARMORYDBPREFIX_randomproperties` for id %d', __METHOD__, $enchId); - return false; - } $return_data = array(); - $return_data['suffix'] = $rand_data['name']; - $return_data['data'] = array(); - for($i = 1; $i < 4; $i++) { - if($rand_data['ench_' . $i] > 0) { - $return_data['data'][$i] = $this->armory->aDB->selectCell("SELECT `text_%s` FROM `ARMORYDBPREFIX_enchantment` WHERE `id`=%d", $this->armory->GetLocale(), $rand_data['ench_' . $i]); + $table = 'randomproperties'; + if($use == 'property') { + $rand_data = $this->armory->aDB->selectRow("SELECT `name_%s` AS `name`, `ench_1`, `ench_2`, `ench_3` FROM `ARMORYDBPREFIX_randomproperties` WHERE `id`=%d", $this->armory->GetLocale(), $enchId); + } + elseif($use == 'suffix') { + $table = 'randomsuffix'; + } + if($table == 'randomproperties') { + if(!$rand_data) { + $this->armory->Log()->writeLog('%s : unable to get rand_data FROM `%s_%s` for id %d (itemGuid: %d, ownerGuid: %d)', __METHOD__, $this->armory->armoryconfig['db_prefix'], $table, $enchId, $item_guid, $owner_guid); + return false; + } + $return_data['suffix'] = $rand_data['name']; + $return_data['data'] = array(); + for($i = 1; $i < 4; $i++) { + if($rand_data['ench_' . $i] > 0) { + $return_data['data'][$i] = $this->armory->aDB->selectCell("SELECT `text_%s` FROM `ARMORYDBPREFIX_enchantment` WHERE `id`=%d", $this->armory->GetLocale(), $rand_data['ench_' . $i]); + } + } + } + elseif($table == 'randomsuffix') { + $enchant = $this->armory->aDB->selectRow("SELECT `id`, `name_%s` AS `name`, `ench_1`, `ench_2`, `ench_3`, `pref_1`, `pref_2`, `pref_3` FROM `ARMORYDBPREFIX_randomsuffix` WHERE `id`=%d", $this->armory->GetLocale(), $enchId); + if(!$enchant) { + return false; + } + $return_data['suffix'] = $enchant['name']; + $return_data['data'] = array(); + $item_data = $this->armory->wDB->selectRow("SELECT `InventoryType`, `ItemLevel`, `Quality` FROM `item_template` WHERE `entry`=%d", $item_entry); + $points = self::GetRandomPropertiesPoints($item_data['ItemLevel'], $item_data['InventoryType'], $item_data['Quality']); + $return_data = array( + 'suffix' => $enchant['name'], + 'data' => array() + ); + $k = 1; + for($i = 1; $i < 4; $i++) { + if(isset($enchant['ench_' . $i]) && $enchant['ench_' . $i] > 0) { + $cur = $this->armory->aDB->selectCell("SELECT `text_%s` FROM `ARMORYDBPREFIX_enchantment` WHERE `id` = %d", $this->armory->GetLocale(), $enchant['ench_' . $i]); + $return_data['data'][$k] = str_replace('$i', round(floor($points * $enchant['pref_' . $i] / 10000), 0), $cur); + } + $k++; } } return $return_data; @@ -1872,10 +1930,10 @@ private function CreateAdditionalItemTooltip($itemID, XMLHandler $xml, Character } else { if($itemSlotName) { - $rPropInfo = self::GetRandomPropertiesData($itemID, $characters->GetGUID(), $characters->GetEquippedItemGuidBySlot($itemSlotName)); + $rPropInfo = self::GetRandomPropertiesData($itemID, $characters->GetGUID(), $characters->GetEquippedItemGuidBySlot($itemSlotName), false, $characters->GetServerType(), $item, array('RandomProperty' => $proto->RandomProperty, 'RandomSuffix' => $proto->RandomSuffix)); } else { - $rPropInfo = self::GetRandomPropertiesData($itemID, $characters->GetGUID()); + $rPropInfo = self::GetRandomPropertiesData($itemID, $characters->GetGUID(), 0, false, $characters->GetServerType(), $item); } if($isCharacter && !$parent && is_array($rPropInfo)) { $xml->XMLWriter()->startElement('randomEnchantData'); @@ -2994,5 +3052,10 @@ private function IsMultiplyItemSet($itemSetID) { } return false; } + + public function GetItemIdByName($name) { + $name = Utils::escape(urldecode($name)); + return $this->armory->wDB->selectCell("SELECT `entry` FROM `item_template` WHERE `name` = '%s' LIMIT 1", $name); + } } ?> \ No newline at end of file diff --git a/includes/classes/class.utils.php b/includes/classes/class.utils.php index 5bf07065a..c87a06b44 100644 --- a/includes/classes/class.utils.php +++ b/includes/classes/class.utils.php @@ -3,7 +3,7 @@ /** * @package World of Warcraft Armory * @version Release Candidate 1 - * @revision 398 + * @revision 400 * @copyright (c) 2009-2010 Shadez * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @@ -114,6 +114,7 @@ public function CloseSession() { * @param int $guildId * @param int $realmId * @return bool + * @todo Add guild bank tab access handling **/ public function IsAllowedToGuildBank($guildId, $realmId) { if(!isset($_SESSION['accountId'])) { diff --git a/includes/revision_nr.php b/includes/revision_nr.php index a181e4ced..309fe72a7 100644 --- a/includes/revision_nr.php +++ b/includes/revision_nr.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/sql/updates/characters_r399_character_feed_log.sql b/sql/updates/characters_r399_character_feed_log.sql new file mode 100644 index 000000000..90c2e1c0d --- /dev/null +++ b/sql/updates/characters_r399_character_feed_log.sql @@ -0,0 +1,2 @@ +-- This update is for `characters` database, not `armory`! +ALTER TABLE `character_feed_log` CHANGE `difficulty` `difficulty` SMALLINT( 6 ) DEFAULT '-1'; \ No newline at end of file diff --git a/sql/wowarmory_rc1_r398.7z b/sql/wowarmory_rc1_r398.7z new file mode 100644 index 000000000..c5331f149 Binary files /dev/null and b/sql/wowarmory_rc1_r398.7z differ diff --git a/tools/mangos/sql/characters.sql b/tools/mangos/sql/characters.sql index 6d90052c2..43fb56bc5 100644 --- a/tools/mangos/sql/characters.sql +++ b/tools/mangos/sql/characters.sql @@ -12,6 +12,6 @@ CREATE TABLE `character_feed_log` ( `data` int(11) NOT NULL, `date` int(11) default NULL, `counter` int(11) NOT NULL, - `difficulty` smallint(6) NOT NULL, + `difficulty` smallint(6) default '-1', PRIMARY KEY (`guid`,`type`,`data`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/tools/mangos/wowarmory_arena_chart.patch b/tools/mangos/wowarmory_arena_chart.patch index c3e65a013..eaae5f241 100644 --- a/tools/mangos/wowarmory_arena_chart.patch +++ b/tools/mangos/wowarmory_arena_chart.patch @@ -1,9 +1,9 @@ diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp -index 8343ab5..08debcc 100644 +index a786ffa..b6db14f 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -723,6 +723,47 @@ void BattleGround::EndBattleGround(uint32 winner) - DEBUG_LOG("--- Winner rating: %u, Loser rating: %u, Winner change: %u, Losser change: %u ---", winner_rating, loser_rating, winner_change, loser_change); + DEBUG_LOG("--- Winner rating: %u, Loser rating: %u, Winner change: %i, Loser change: %i ---", winner_rating, loser_rating, winner_change, loser_change); SetArenaTeamRatingChangeForTeam(winner, winner_change); SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loser_change); + /** World of Warcraft Armory **/ @@ -94,10 +94,10 @@ index 0a70990..55ea549 100644 /* diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp -index 4bf7533..b9bf8b0 100644 +index e5f9745..6aac984 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp -@@ -633,6 +633,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa +@@ -658,6 +658,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa { // FIXME: kept by compatibility. don't know in BG if the restriction apply. bg->UpdatePlayerScore(killer, SCORE_DAMAGE_DONE, damage); @@ -108,7 +108,7 @@ index 4bf7533..b9bf8b0 100644 } } -@@ -5872,6 +5876,10 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro +@@ -6000,6 +6004,10 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro { ((Player*)pVictim)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_HEALING_RECEIVED, gain); ((Player*)pVictim)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED, addhealth); diff --git a/tools/mangos/wowarmory_patch.patch b/tools/mangos/wowarmory_patch.patch index af07e82cc..bb26edf62 100644 --- a/tools/mangos/wowarmory_patch.patch +++ b/tools/mangos/wowarmory_patch.patch @@ -1,5 +1,5 @@ diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp -index 3ef1762..95de09e 100644 +index 3a4c63d..69cb02d 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -1995,6 +1995,9 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement) @@ -13,14 +13,13 @@ index 3ef1762..95de09e 100644 CompletedAchievementData& ca = m_completedAchievements[achievement->ID]; ca.date = time(NULL); diff --git a/src/game/Item.cpp b/src/game/Item.cpp -index 52e58a9..b1c7951 100644 +index 52e58a9..82f425c 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp -@@ -953,6 +953,16 @@ Item* Item::CreateItem( uint32 item, uint32 count, Player const* player ) - count = pProto->GetMaxStackSize(); +@@ -954,6 +954,16 @@ Item* Item::CreateItem( uint32 item, uint32 count, Player const* player ) MANGOS_ASSERT(count !=0 && "pProto->Stackable==0 but checked at loading already"); -+ + + /** World of Warcraft Armory **/ + if (pProto->Quality > 2 && pProto->Flags != 2048 && (pProto->Class == ITEM_CLASS_WEAPON || pProto->Class == ITEM_CLASS_ARMOR) && player) + { @@ -30,14 +29,15 @@ index 52e58a9..b1c7951 100644 + CharacterDatabase.PExecute( ss.str().c_str() ); + } + /** World of Warcraft Armory **/ - ++ Item *pItem = NewItemOrBag( pProto ); if( pItem->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_ITEM), item, player) ) + { diff --git a/src/game/Player.cpp b/src/game/Player.cpp -index 19d749e..3c8ea9b 100644 +index dbb71d9..f32af9b 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp -@@ -16737,6 +16737,17 @@ void Player::SaveToDB() +@@ -16742,6 +16742,17 @@ void Player::SaveToDB() DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_STATS, "The value of player %s at save: ", m_name.c_str()); outDebugStatsValues(); @@ -55,7 +55,7 @@ index 19d749e..3c8ea9b 100644 CharacterDatabase.BeginTransaction(); -@@ -22295,3 +22306,34 @@ void Player::SetRestType( RestType n_r_type, uint32 areaTriggerId /*= 0*/) +@@ -22315,3 +22326,40 @@ void Player::SetRestType( RestType n_r_type, uint32 areaTriggerId /*= 0*/) SetFFAPvP(false); } } @@ -63,9 +63,15 @@ index 19d749e..3c8ea9b 100644 +/** World of Warcraft Armory **/ +void Player::WriteWowArmoryDatabaseLog(uint32 type, uint32 data) +{ ++ /* ++ Log types: ++ 1 - achievement feed ++ 2 - loot feed ++ 3 - boss kill feed ++ */ + uint32 pGuid = GetGUIDLow(); + sLog.outDetail("WoWArmory: write feed log (guid: %u, type: %u, data: %u", pGuid, type, data); -+ if (type <= 0) // Unknown type ++ if (type <= 0 || type > 3) // Unknown type + { + sLog.outError("WoWArmory: unknown type id: %d, ignore.", type); + return; @@ -92,10 +98,10 @@ index 19d749e..3c8ea9b 100644 +/** World of Warcraft Armory **/ \ No newline at end of file diff --git a/src/game/Player.h b/src/game/Player.h -index 0b34970..ac556b4 100644 +index 4a9240e..0590d31 100644 --- a/src/game/Player.h +++ b/src/game/Player.h -@@ -2277,6 +2277,10 @@ class MANGOS_DLL_SPEC Player : public Unit +@@ -2279,6 +2279,10 @@ class MANGOS_DLL_SPEC Player : public Unit bool TeleportToHomebind(uint32 options = 0) { return TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation(), options); } Object* GetObjectByTypeMask(ObjectGuid guid, TypeMask typemask); @@ -107,19 +113,19 @@ index 0b34970..ac556b4 100644 // currently visible objects at player client ObjectGuidSet m_clientGUIDs; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp -index 4bf7533..84986df 100644 +index e5f9745..b412f27 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp -@@ -831,7 +831,12 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa +@@ -859,7 +859,11 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa if (m->IsRaidOrHeroicDungeon()) { if(cVictim->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND) +- ((InstanceMap *)m)->PermBindAllPlayers(creditedPlayer); + { - ((InstanceMap *)m)->PermBindAllPlayers(creditedPlayer); -+ /** World of Warcraft Armory **/ ++ ((InstanceMap *)m)->PermBindAllPlayers(creditedPlayer);/** World of Warcraft Armory **/ + creditedPlayer->WriteWowArmoryDatabaseLog(3, cVictim->GetCreatureInfo()->Entry); // Difficulty will be defined in Player::WriteWowArmoryDatabaseLog(); + /** World of Warcraft Armory **/ + } } else - { + { \ No newline at end of file diff --git a/tools/trinity_core/characters_patch.sql b/tools/trinity_core/characters_patch.sql index c1c9adf67..f6cfc8aa2 100644 --- a/tools/trinity_core/characters_patch.sql +++ b/tools/trinity_core/characters_patch.sql @@ -10,8 +10,9 @@ CREATE TABLE `character_feed_log` ( `guid` int(11) NOT NULL, `type` smallint(1) NOT NULL, `data` int(11) NOT NULL, - `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `date` int(11) default NULL, `counter` int(11) NOT NULL, + `difficulty` smallint(6) default '-1', PRIMARY KEY (`guid`,`type`,`data`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/tools/trinity_core/sql/characters_patch.sql b/tools/trinity_core/sql/characters_patch.sql index fd3cce004..f6cfc8aa2 100644 --- a/tools/trinity_core/sql/characters_patch.sql +++ b/tools/trinity_core/sql/characters_patch.sql @@ -12,7 +12,7 @@ CREATE TABLE `character_feed_log` ( `data` int(11) NOT NULL, `date` int(11) default NULL, `counter` int(11) NOT NULL, - `difficulty` smallint(6) NOT NULL, + `difficulty` smallint(6) default '-1', PRIMARY KEY (`guid`,`type`,`data`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;