Skip to content

Commit

Permalink
App/Emulators: get Socket Bonus field from item_template
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightprince committed Oct 23, 2024
1 parent f4dd9b6 commit 399ec49
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/emulators/azerothcore.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class Azerothcore implements Emulator
protected array $queries = [
'get_ip_banned' => 'SELECT ip, bandate, bannedby, banreason, unbandate FROM ip_banned WHERE ip=? AND unbandate > ?',
'get_character' => 'SELECT * FROM characters WHERE guid=?',
'get_item' => 'SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable FROM item_template WHERE entry=?',
'get_item' => 'SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable, socketBonus FROM item_template WHERE entry=?',
'get_rank' => 'SELECT id id, gmlevel gmlevel, RealmID RealmID FROM account_access WHERE id=?',
'get_banned' => 'SELECT id id, bandate bandate, bannedby bannedby, banreason banreason, active active FROM account_banned WHERE id=? AND active=1',
'get_charactername_by_guid' => 'SELECT name name FROM characters WHERE guid = ?',
Expand Down
2 changes: 1 addition & 1 deletion application/emulators/azerothcore_old.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class Azerothcore_old implements Emulator
protected array $queries = [
'get_ip_banned' => 'SELECT ip, bandate, bannedby, banreason, unbandate FROM ip_banned WHERE ip=? AND unbandate > ?',
'get_character' => 'SELECT * FROM characters WHERE guid=?',
'get_item' => 'SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable FROM item_template WHERE entry=?',
'get_item' => 'SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable, socketBonus FROM item_template WHERE entry=?',
'get_rank' => 'SELECT id id, gmlevel gmlevel, RealmID RealmID FROM account_access WHERE id=?',
'get_banned' => 'SELECT id id, bandate bandate, bannedby bannedby, banreason banreason, active active FROM account_banned WHERE id=? AND active=1',
'get_charactername_by_guid' => 'SELECT name name FROM characters WHERE guid = ?',
Expand Down
2 changes: 1 addition & 1 deletion application/emulators/oregoncore.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class Oregoncore implements Emulator
"get_ip_banned" => "SELECT ip, bandate, bannedby, banreason, unbandate FROM ip_banned WHERE ip=? AND unbandate > ?",
"pvp_character" => "SELECT * FROM characters WHERE totalKills > 0 ORDER BY totalKills DESC LIMIT ",
"get_character" => "SELECT * FROM characters WHERE guid=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable FROM item_template WHERE entry=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable, socketBonus FROM item_template WHERE entry=?",
"get_rank" => "SELECT id id, gmlevel gmlevel FROM account_access WHERE id=?",
"get_banned" => "SELECT id id, bandate bandate, bannedby bannedby, banreason banreason, active active FROM account_banned WHERE id=? AND active=1",
"get_charactername_by_guid" => "SELECT name name FROM characters WHERE guid = ?",
Expand Down
2 changes: 1 addition & 1 deletion application/emulators/skyfire.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class Skyfire implements Emulator
*/
protected array $queries = [
"get_character" => "SELECT * FROM characters WHERE guid=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, RequiredLevel, ItemLevel, class, subclass, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable FROM item_template WHERE entry=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, RequiredLevel, ItemLevel, class, subclass, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable, socketBonus FROM item_template WHERE entry=?",
"get_rank" => "SELECT id id, gmlevel gmlevel, RealmID RealmID FROM account_access WHERE id=?",
"get_banned" => "SELECT id id, bandate bandate, bannedby bannedby, banreason banreason, active active FROM account_banned WHERE id=? AND active=1",
"get_charactername_by_guid" => "SELECT name name FROM characters WHERE guid = ?",
Expand Down
2 changes: 1 addition & 1 deletion application/emulators/trinity.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Trinity implements Emulator
protected array $queries = [
'get_ip_banned' => 'SELECT ip, bandate, bannedby, banreason, unbandate FROM ip_banned WHERE ip=? AND unbandate > ?',
'get_character' => 'SELECT * FROM characters WHERE guid=?',
'get_item' => 'SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable FROM item_template WHERE entry=?',
'get_item' => 'SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, armor, RequiredLevel, ItemLevel, class, subclass, dmg_min1, dmg_max1, dmg_type1, holy_res, fire_res, nature_res, frost_res, shadow_res, arcane_res, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable, socketBonus FROM item_template WHERE entry=?',
'get_rank' => 'SELECT AccountId id, SecurityLevel gmlevel, RealmID RealmID FROM account_access WHERE AccountId=?',
'get_banned' => 'SELECT id id, bandate bandate, bannedby bannedby, banreason banreason, active active FROM account_banned WHERE id=? AND active=1',
'get_charactername_by_guid' => 'SELECT name name FROM characters WHERE guid = ?',
Expand Down
2 changes: 1 addition & 1 deletion application/emulators/trinity_cata.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class Trinity_cata implements Emulator
*/
protected array $queries = [
"get_character" => "SELECT * FROM characters WHERE guid=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, RequiredLevel, ItemLevel, class, subclass, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable FROM item_template WHERE entry=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, RequiredLevel, ItemLevel, class, subclass, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable, socketBonus FROM item_template WHERE entry=?",
"get_rank" => "SELECT id id, gmlevel gmlevel, RealmID RealmID FROM account_access WHERE id=?",
"get_banned" => "SELECT id id, bandate bandate, bannedby bannedby, banreason banreason, active active FROM account_banned WHERE id=? AND active=1",
"get_charactername_by_guid" => "SELECT name name FROM characters WHERE guid = ?",
Expand Down
2 changes: 1 addition & 1 deletion application/emulators/trinity_old.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class Trinity_old implements Emulator
*/
protected array $queries = [
"get_character" => "SELECT * FROM characters WHERE guid=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, RequiredLevel, ItemLevel, class, subclass, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable FROM item_template WHERE entry=?",
"get_item" => "SELECT entry, Flags, name, displayid, Quality, bonding, InventoryType, MaxDurability, RequiredLevel, ItemLevel, class, subclass, delay, socketColor_1, socketColor_2, socketColor_3, spellid_1, spellid_2, spellid_3, spellid_4, spellid_5, spelltrigger_1, spelltrigger_2, spelltrigger_3, spelltrigger_4, spelltrigger_5, displayid, stat_type1, stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, stat_value9, stat_type10, stat_value10, stackable, socketBonus FROM item_template WHERE entry=?",
"get_rank" => "SELECT id id, gmlevel gmlevel, RealmID RealmID FROM account_access WHERE id=?",
"get_banned" => "SELECT id id, bandate bandate, bannedby bannedby, banreason banreason, active active FROM account_banned WHERE id=? AND active=1",
"get_charactername_by_guid" => "SELECT name name FROM characters WHERE guid = ?",
Expand Down
3 changes: 3 additions & 0 deletions application/libraries/Items.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ private function getItemDataFromWorldDB($itemDB)
$item['dps'] = $this->getDPS($item['damage_min'], $item['damage_max'], $item['speed']);
$item['sockets'] = $this->getSockets($itemDB);

if (isset($item['socketBonus']))
$item['socketBonus'] = $itemDB['socketBonus'];

return $item;
}

Expand Down

0 comments on commit 399ec49

Please sign in to comment.