mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/Sources
* rewrote SetupSrcipt * implemented 'zone' parameter * implemented 'bossdrop' parameter * implemented 'dungeondifficulty' parameter * implemented item filter relying on zone information (dropsInX) * fixed world random drops showing a single loot source * extended Source column of spells to the same functionality as items ToDo: * apply new 'commondrop' parameter on loot listviews * gather difficuly versions of gameobjects and apply the same logic as for creatures * implement fake spawns so npcs can get linked to a zone
This commit is contained in:
@@ -12935,16 +12935,115 @@ Listview.templates = {
|
||||
hidden: true,
|
||||
compute: function(spell, td) {
|
||||
if (spell.source != null) {
|
||||
var buff = '';
|
||||
for (var i = 0, len = spell.source.length; i < len; ++i) {
|
||||
if (i > 0) {
|
||||
buff += LANG.comma;
|
||||
if (spell.source.length == 1) {
|
||||
$WH.nw(td);
|
||||
|
||||
var sm = (spell.sourcemore ? spell.sourcemore[0] : {});
|
||||
var type = 0;
|
||||
|
||||
if (sm.t) {
|
||||
type = sm.t;
|
||||
|
||||
var a = $WH.ce('a');
|
||||
if (sm.q != null) {
|
||||
a.className = 'q' + sm.q;
|
||||
}
|
||||
else {
|
||||
a.className = 'q1';
|
||||
}
|
||||
a.href = '?' + g_types[sm.t] + '=' + sm.ti;
|
||||
a.style.whiteSpace = 'nowrap';
|
||||
|
||||
if (sm.icon) {
|
||||
a.className += ' icontiny tinyspecial';
|
||||
a.style.backgroundImage = 'url("' + g_staticUrl + '/images/wow/icons/tiny/' + sm.icon.toLowerCase() + '.gif")';
|
||||
}
|
||||
|
||||
$WH.ae(a, $WH.ct(sm.n));
|
||||
$WH.ae(td, a);
|
||||
}
|
||||
else {
|
||||
$WH.ae(td, $WH.ct(Listview.funcBox.getUpperSource(spell.source[0], sm)));
|
||||
}
|
||||
|
||||
var ls = Listview.funcBox.getLowerSource(spell.source[0], sm, type);
|
||||
|
||||
if (this.iconSize != 0 && ls != null) {
|
||||
var div = $WH.ce('div');
|
||||
div.className = 'small2';
|
||||
|
||||
if (ls.pretext) {
|
||||
$WH.ae(div, $WH.ct(ls.pretext));
|
||||
}
|
||||
|
||||
if (ls.url) {
|
||||
var a = $WH.ce('a');
|
||||
a.className = 'q1';
|
||||
a.href = ls.url;
|
||||
$WH.ae(a, $WH.ct(ls.text));
|
||||
$WH.ae(div, a);
|
||||
}
|
||||
else {
|
||||
$WH.ae(div, $WH.ct(ls.text));
|
||||
}
|
||||
|
||||
if (ls.posttext) {
|
||||
$WH.ae(div, $WH.ct(ls.posttext));
|
||||
}
|
||||
|
||||
$WH.ae(td, div);
|
||||
}
|
||||
buff += g_sources[spell.source[i]];
|
||||
}
|
||||
else {
|
||||
var buff = '';
|
||||
for (var i = 0, len = spell.source.length; i < len; ++i) {
|
||||
if (i > 0) {
|
||||
buff += LANG.comma;
|
||||
}
|
||||
buff += g_sources[spell.source[i]];
|
||||
}
|
||||
}
|
||||
|
||||
return buff;
|
||||
}
|
||||
},
|
||||
getVisibleText: function(spell) {
|
||||
if (spell.source != null) {
|
||||
if (spell.source.length == 1) {
|
||||
var buff = '';
|
||||
|
||||
var sm = (spell.sourcemore ? spell.sourcemore[0] : {});
|
||||
var type = 0;
|
||||
|
||||
if (sm.t) {
|
||||
type = sm.t;
|
||||
buff += ' ' + sm.n;
|
||||
}
|
||||
else {
|
||||
buff += ' ' + Listview.funcBox.getUpperSource(spell.source[0], sm);
|
||||
}
|
||||
|
||||
var ls = Listview.funcBox.getLowerSource(spell.source[0], sm, type);
|
||||
|
||||
if (ls != null) {
|
||||
if (ls.pretext) {
|
||||
buff += ' ' + ls.pretext;
|
||||
}
|
||||
|
||||
buff += ' ' + ls.text;
|
||||
|
||||
if (ls.posttext) {
|
||||
buff += ' ' + ls.posttext;
|
||||
}
|
||||
}
|
||||
|
||||
return buff;
|
||||
}
|
||||
else {
|
||||
return Listview.funcBox.arrayText(spell.source, g_sources);
|
||||
}
|
||||
}
|
||||
},
|
||||
sortFunc: function(a, b, col) {
|
||||
return Listview.funcBox.assocArrCmp(a.source, b.source, g_sources);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user