implemented detail-page for pets

- plus food and talents, minus zones (those are just madning)
 - also addes some bc/classic information on pet scaling

* mucked about the modelviewer, always uses high quality version .. should muck about some more to add animation-info and remove the java-option
* fixed some minor issues in spell maxaffectedtaregs in spell is displayed properly and erronous adding all classes/races to globals if none where selected
* created own table for creatures which unifies creature_template, locales_creature, creature_template_addon and some creatureDisplayInfo.dbc information
* more work against listviews and general structure in global.js .. should probably split this file by class and reassemble it for use
This commit is contained in:
Sarjuuk
2013-07-02 22:10:25 +02:00
parent 4c974f87c5
commit a3f16f0e0d
31 changed files with 1839 additions and 1098 deletions

View File

@@ -0,0 +1,8 @@
var _ = g_npcs;
{strip}
{foreach from=$data key=id item=item}
_[{$id}]={ldelim}
name_{$user.language}:'{$item.name|escape:"javascript"}'
{rdelim};
{/foreach}
{/strip}

View File

@@ -6,4 +6,4 @@ var _ = g_gatheredcurrencies;
icon:'{$item.icon|escape:"javascript"}'
{rdelim};
{/foreach}
{/strip}
{/strip}

View File

@@ -29,4 +29,4 @@
{/foreach}
]
{rdelim});
{/strip}
{/strip}

View File

@@ -27,4 +27,4 @@
{/foreach}
]
{rdelim});
{/strip}
{/strip}

View File

@@ -32,4 +32,4 @@
{/foreach}
]
{rdelim});
{/strip}
{/strip}

View File

@@ -0,0 +1,65 @@
{strip}
new Listview({ldelim}
template:'npc',
{if !isset($params.id)}id:'spells',{/if}
{if !isset($params.name)}name:LANG.tab_npcs,{/if}
{if !isset($params.parent)}parent:'listview-generic',{/if}
{foreach name=params from=$params key=k item=v}
{if $v[0] == '$'}
{$k}:{$v|substr:1},
{else if $v}
{$k}:'{$v}',
{/if}
{/foreach}
data:[
{foreach name=i from=$data item=curr}
{ldelim}
name:'{$curr.name|escape:"quotes"}',
{if $curr.tag}
tag:'{$curr.tag|escape:"quotes"}',
{/if}
minlevel:{$curr.minlevel},
maxlevel:{$curr.maxlevel},
type:{$curr.type},
classification:{$curr.rank},
{if $curr.boss}
boss: 1,
{/if}
react:{$curr.react},
location:{$curr.location},
{if $curr.skin}
skin: '{$curr.skin}',
{/if}
{if isset($curr.percent)}
percent:{$curr.percent},
{/if}
{if isset($curr.cost)}
stock:{$curr.stock},
{if isset($curr.stack)}
stack:{$curr.stack},
{/if}
cost:[
{if isset($curr.cost.money)}{$curr.cost.money}{/if}
{if isset($curr.cost.honor) or isset($curr.cost.arena) or isset($curr.cost.items)}
,{if isset($curr.cost.honor)}{$curr.cost.honor}{/if}
{if isset($curr.cost.arena) or isset($curr.cost.items)}
,{if isset($curr.cost.arena)}{$curr.cost.arena}{/if}
{if isset($curr.cost.items)}
,[
{foreach from=$curr.cost.items item=curitem name=c}
[{$curitem.item},{$curitem.count}]
{if $smarty.foreach.c.last}{else},{/if}
{/foreach}
]
{/if}
{/if}
{/if}
],
{/if}
id:{$curr.id}
{rdelim}
{if $smarty.foreach.i.last}{else},{/if}
{/foreach}
]{rdelim}
);
{/strip}

View File

@@ -17,10 +17,10 @@
id:{$curr.id},
category:{$curr.category},
name:'{$curr.name|escape:"javascript"}',
icon:'{$curr.icon}',
icon:'{$curr.icon}'
{rdelim}
{if $smarty.foreach.i.last}{else},{/if}
{/foreach}
]
{rdelim});
{/strip}
{/strip}

View File

@@ -0,0 +1,29 @@
{strip}
new Listview({ldelim}
template:'model',
{if !isset($params.id)}id:'gallery',{/if}
{if !isset($params.name)}name:LANG.tab_gallery,{/if}
{if !isset($params.parent)}parent:'listview-generic',{/if}
{foreach from=$params key=k item=v}
{if $v[0] == '$'}
{$k}:{$v|substr:1},
{else if $v}
{$k}:'{$v}',
{/if}
{/foreach}
data:[
{foreach name=i from=$data item=curr}
{ldelim}
family:{$curr.family},
modelId:{$curr.modelId},
displayId:{$curr.displayId},
skin:'{$curr.skin|escape:"javascript"}',
count:{$curr.count},
minLevel:{$curr.minlevel},
maxLevel:{$curr.maxlevel}
{rdelim}
{if $smarty.foreach.i.last}{else},{/if}
{/foreach}
]
{rdelim});
{/strip}

View File

@@ -54,4 +54,4 @@ var _ = function(family)
{/foreach}
]
{rdelim});
{/strip}
{/strip}

View File

@@ -31,4 +31,4 @@
{/foreach}
]
{rdelim});
{/strip}
{/strip}

View File

@@ -33,4 +33,3 @@
]
{rdelim});
{/strip}

View File

@@ -2058,7 +2058,8 @@ a.star-icon-right span
.screenshot-cell img
{
border: 3px solid #404040;
border: 2px solid #404040;
background-color: #080808;
margin-bottom: 3px;
}

View File

@@ -39,5 +39,6 @@
{if isset($lvData.gRaces)} { include file='bricks/globals/races.tpl' data=$lvData.gRaces }{/if}
{if isset($lvData.gSpells)} { include file='bricks/globals/spells.tpl' data=$lvData.gSpells }{/if}
{if isset($lvData.gTitles)} { include file='bricks/globals/titles.tpl' data=$lvData.gTitles }{/if}
{* TODO: Factions, Quests, NPCs, Objects, g_gatheredzones(?) *}
{if isset($lvData.gCreatures)} { include file='bricks/globals/creatures.tpl' data=$lvData.gCreatures }{/if}
{* TODO: Factions, Quests, Objects, g_gatheredzones(?) *}
</script>{/strip}

View File

@@ -2736,13 +2736,13 @@ function TalentCalc() {
allowfullscreen: true,
menu: false,
bgcolor: '#181818',
wmode: 'opaque'
wmode: 'direct'
};
var attributes = {};
swfobject.embedSWF(
swfUrl + '/modelviewer/ModelView.swf',
swfUrl + '/modelviewer/ZAMviewerfp11.swf',
_swfModel.id,
'100%',
'100%',

File diff suppressed because it is too large Load Diff

View File

@@ -858,7 +858,7 @@ var mn_database = [
];
var mn_tools = [
[0,"Talent Calculator","?talent",mn_talentCalc],
[2,"Pet Calculator","?petcalc",mn_petCalc],
[2,"Hunter Pet Calculator","?petcalc",mn_petCalc],
[3,"Item Comparison","?compare"],
[5,"Profiler","?profiler",[
[0,"Characters","?profiles"],

59
template/pet.tpl Normal file
View File

@@ -0,0 +1,59 @@
{include file='header.tpl'}
<div class="main" id="main">
<div class="main-precontents" id="main-precontents"></div>
<div class="main-contents" id="main-contents">
{if !empty($announcements)}
{foreach from=$announcements item=item}
{include file='bricks/announcement.tpl' an=$item}
{/foreach}
{/if}
<script type="text/javascript">//<![CDATA[
{include file='bricks/community.tpl'}
var g_pageInfo = {ldelim}type: {$page.type}, typeId: {$page.typeId}, name: '{$lvData.page.name|escape:"quotes"}'{rdelim};
g_initPath({$page.path});
//]]></script>
{include file='bricks/infobox.tpl'}
<div class="text">
<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({ldelim} type: 9, typeId: {$lvData.page.id} {rdelim});"><em><b><i>{$lang.links}</i></b><span>{$lang.links}</span></em></a>
<a href="?petcalc#{$lvData.page.petCalc}" class="button-red"><em><b><i>{$lang.petCalc}</i></b><span>{$lang.petCalc}</span></em></a>
<a href="http://old.wowhead.com/?{$query[0]}={$query[1]}" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
<div id="h1-icon-generic" class="h1-icon"></div>
<script type="text/javascript">//<![CDATA[
ge('h1-icon-generic').appendChild(Icon.create('{$lvData.page.icon}', 1));
//]]></script>
<h1 class="h1-icon">{if isset($lvData.page.expansion)}<span class="{$lvData.page.expansion}-icon-right">{$lvData.page.name}</span>{else}{$lvData.page.name}{/if}</h1>
{include file='bricks/article.tpl'}
<h2 class="clear">{$lang.related}</h2>
</div>
<div id="tabs-generic"></div>
<div id="listview-generic" class="listview"></div>
<script type="text/javascript">//<![CDATA[
var tabsRelated = new Tabs({ldelim}parent: ge('tabs-generic'){rdelim});
{if isset($lvData.gallery)} {include file='bricks/listviews/model.tpl' data=$lvData.gallery.data params=$lvData.gallery.params } {/if}
{if isset($lvData.tameable)} {include file='bricks/listviews/creature.tpl' data=$lvData.tameable.data params=$lvData.tameable.params } {/if}
{if isset($lvData.abilities)} {include file='bricks/listviews/spell.tpl' data=$lvData.abilities.data params=$lvData.abilities.params} {/if}
{if isset($lvData.talents)} {include file='bricks/listviews/spell.tpl' data=$lvData.talents.data params=$lvData.talents.params } {/if}
{if isset($lvData.diet)} {include file='bricks/listviews/item.tpl' data=$lvData.diet.data params=$lvData.diet.params } {/if}
new Listview({ldelim}template: 'comment', id: 'comments', name: LANG.tab_comments, tabs: tabsRelated, parent: 'listview-generic', data: lv_comments{rdelim});
new Listview({ldelim}template: 'screenshot', id: 'screenshots', name: LANG.tab_screenshots, tabs: tabsRelated, parent: 'listview-generic', data: lv_screenshots{rdelim});
if (lv_videos.length || (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)))
new Listview({ldelim}template: 'video', id: 'videos', name: LANG.tab_videos, tabs: tabsRelated, parent: 'listview-generic', data: lv_videos{rdelim});
tabsRelated.flush();
//]]></script>
{include file='bricks/contribute.tpl'}
</div><!-- main-contents -->
</div><!-- main -->
{include file='footer.tpl'}