diff --git a/mojotrollz/api/qq/TBC_ITEM.php b/mojotrollz/api/qq/TBC_ITEM.php index 74da63d..1e22ff3 100644 --- a/mojotrollz/api/qq/TBC_ITEM.php +++ b/mojotrollz/api/qq/TBC_ITEM.php @@ -3,8 +3,20 @@ namespace SQL; class TBC_ITEM extends \SYSTEM\DB\QP { public static function get_class(){return \get_class();} public static function mysql(){return -'SELECT item_template.*, lower(mangos_one_dbc.itemdisplayinfo.6) as icon FROM item_template'. +'SELECT item_template.*,'. +' lower(mangos_one_dbc.itemdisplayinfo.6) as icon,'. +' s1.161 as spelltext_1'. +//' s2.161 as spelltext_2,'. +//' s3.161 as spelltext_3,'. +//' s4.161 as spelltext_4,'. +//' s5.161 as spelltext_5'. +' FROM item_template'. ' LEFT JOIN mangos_one_dbc.itemdisplayinfo ON item_template.displayid = mangos_one_dbc.itemdisplayinfo.1'. +' LEFT JOIN mangos_one_dbc.spell AS s1 ON item_template.spellid_1 = s1.1'. +//' LEFT JOIN mangos_one_dbc.spell AS s2 ON item_template.spellid_2 = s2.1'. +//' LEFT JOIN mangos_one_dbc.spell AS s3 ON item_template.spellid_3 = s3.1'. +//' LEFT JOIN mangos_one_dbc.spell AS s4 ON item_template.spellid_4 = s4.1'. +//' LEFT JOIN mangos_one_dbc.spell AS s5 ON item_template.spellid_5 = s5.1'. ' WHERE entry = ?;'; } } \ No newline at end of file diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/css/default_item.scss b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/css/default_item.scss index 3ecd7d7..edddf3b 100644 --- a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/css/default_item.scss +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/css/default_item.scss @@ -25,7 +25,16 @@ $flavour: #FFD100; } - +@mixin money( $type: "copper" ) { + + $srcUrl: "http://wowimg.zamimg.com/images/"; + $type: $srcUrl + "icons/money-#{$type}.gif"; + + background-image: url( $type ); + background-repeat: no-repeat; + background-position: right; + +} .wow-icon { @@ -272,6 +281,31 @@ $flavour: #FFD100; } +.wow-item__price { + .price { + &__gold { + @include money( "gold" ); + float: left; + padding-right: 15px; + margin-left: 2px; + } + + &__silver { + @include money( "silver" ); + float: left; + padding-right: 15px; + margin-left: 2px; + } + + &__copper { + @include money( "copper" ); + float: left; + padding-right: 15px; + margin-left: 2px; + } + } +} + .wow-item__enchantments { margin: $gap*2 0; diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/wow_tooltips.js b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/wow_tooltips.js index 0df307a..8e26859 100644 --- a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/wow_tooltips.js +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/wow_tooltips.js @@ -386,6 +386,15 @@ var wow_statstype = { 48: "Blockvalue" } +var wow_spelltrigger = { + 0: "Use", + 1: "On Equip", + 2: "Chance on Hit", + 4: "Soulstone", + 5: "Use", + 6: "Learn" +} + function wow_tooltips(){ //item hover var items = {} @@ -437,7 +446,14 @@ function wow_tooltips(){ json.result.type = wow_class_subclass[json.result.class][json.result.subclass]; //flags - json.result.unique = json.result.flags % 524288 === 0 ? true : false; + json.result.unique = json.result.flags % 524288 === 0 ? 'true' : 'false'; + + //dmg + if(json.result.dmg_min1 > 0 || json.result.dmg_max1 > 0){ + json.result.damage = { min: json.result.dmg_min1, + max: json.result.dmg_max1, + speed: json.result.delay / 1000} + } //stats json.result.stats = {}; @@ -503,7 +519,29 @@ function wow_tooltips(){ //Set + //spells + json.result.bonuses = []; + if(json.result.spellid_1 !== 0){ + json.result.bonuses[0] = {description: wow_spelltrigger[json.result.spelltrigger_1]+': '+json.result.spelltext_1};} + if(json.result.spellid_2 !== 0){ + json.result.bonuses[1] = {description: wow_spelltrigger[json.result.spelltrigger_2]+': '+json.result.spelltext_2};} + if(json.result.spellid_3 !== 0){ + json.result.bonuses[2] = {description: wow_spelltrigger[json.result.spelltrigger_3]+': '+json.result.spelltext_3};} + if(json.result.spellid_4 !== 0){ + json.result.bonuses[3] = {description: wow_spelltrigger[json.result.spelltrigger_4]+': '+json.result.spelltext_4};} + if(json.result.spellid_5 !== 0){ + json.result.bonuses[4] = {description: wow_spelltrigger[json.result.spelltrigger_5]+': '+json.result.spelltext_5};} + //Price + var sp = json.result.SellPrice; + if(sp / 10000 >= 1){ + json.result.price_gold = Math.floor(sp / 10000); + sp = sp % 10000;} + if(sp / 100 >= 1){ + json.result.price_silver = Math.floor(sp / 100); + sp = sp % 100;} + if(sp => 1){ + json.result.price_copper = sp;} items[json.result.entry] = json.result; if( json.result.icon ) { diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl index 071f698..2db02ae 100644 --- a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl @@ -145,5 +145,16 @@

"{{ description }}"

{{/if}} +
+ {{#if price_gold }} +

Sell Price: {{ price_gold }}

+ {{/if}} + {{#if price_silver }} +

{{ price_silver }}

+ {{/if}} + {{#if price_copper }} +

{{ price_copper }}

+ {{/if}} +
\ No newline at end of file