Commit Graph

94 Commits

Author SHA1 Message Date
Sarjuuk
8ffbf13e03 * added min() and max() funcions for parsing SpellTooltips
* fixed error, when creating ItemTooltips for certain recipes
* fixed logic error when generating jsGlobals and id-array was empty
2013-08-21 09:18:49 +02:00
Sarjuuk
73cdce784e BaseTypes:
- rewrote BaseType::iterate() to be a generator and yield references (requires php 5.5)
- reduced usage of bandaid BaseType::reset()
- removed Util::getIdFieldName() which was even more of a bandaid
- discovered DBSimple::selectPage() and consequently removed $matchQuery as they are now obsoloete

Util:
- added trainerTemplate lists for future use with trainers and trained spells

misc. forgotten and/or broken stuff here and there
2013-08-20 20:45:24 +02:00
Sarjuuk
0b0fa39ff4 * added skills listview-page
* removed some overzealous $WH.-insertions
* fixed logic error omiting jsGlobals with id: 1
2013-08-07 20:58:34 +02:00
Sarjuuk
5436ead926 - implemented item-lookup per weightscale (used in profiler, comparison tool and item upgrade search)
- some minor nonfunctional changes to support 'known' spells
- enabled dynamic update of Spelltooltips changing with pointsPerLevel
2013-08-06 16:50:31 +02:00
Sarjuuk
317af7d768 * moved some more redundant code to basic.js
* moved static item-scaling data to datasets
* Tooltips should now be able to display secondary tooltips (maps) and handle "known" spells (parsing those would be the next step)

tabs to spaces .. a lot
2013-08-04 02:57:55 +02:00
Sarjuuk
3d7c4b8bd7 taking babysteps in the direction of profiles 2013-08-03 21:50:44 +02:00
Sarjuuk
06e5fb7278 * added quests to search
* added forgotten localizations
2013-08-03 21:10:49 +02:00
Sarjuuk
e834f1aee3 * moved duplicate utility/dom-functions from global.js to basic.js
- consequentially prepended $WH to those functions (since i do have issues with regEx, some errors may occur)
* simplified including required JS and CSS files per page
* replaced old Menu-class with (almost) current version. Since it relies heavily on jQuery it is also loaded.
2013-08-03 21:09:23 +02:00
Sarjuuk
b47be3c14a fixed setup for glyph-datasets (custom cases should be handled, when setting up aowow_spells)
translation & wording mishaps

readded jQuery .. is yet to be used
2013-08-02 15:48:29 +02:00
Sarjuuk
55c14eee5c misc:
- fixed caching, by escaping control chars
 - rough support for shortened urls .. kinda
 - achievements shows icons for required items again; also can get name for quest
2013-07-11 23:57:42 +02:00
Sarjuuk
49800da2c8 Moved most code related to jsGlobals to template. (Except for Globals, that belong to the object already created, it makes zero sense to look them up again from the template.)
I'm not overly happy with passing the templateObject to each typeObject, but it works .. for now.
Effectively this should reduce db-lookups as each type should be looked up only twice at max (once for relevant data on the page and maybe again to get related jsGlobals for the template)
also removed BaseType::addRewardsToJscript() get it with BaseType::addGlobalsToJscript() and the appropriate addMask

* added ListviewHelper::getSetFields() wich is more appropriate in some cases (like reagents for spells should be shown even if they are all the same)
* load bricks as needed, removed the if-blocks (maybe add the filename to every TypeClass..?)
2013-07-11 21:47:00 +02:00
Sarjuuk
a8804f6440 Achievements:
- removed excess escapes (htmlspecialchars really needed?)

* urlencode icons for all powered tooltips (some contain obscure symbols)

Spell:
 - added relatedTabs "criteria of" and "contains" (the later should be reworked with generic loot access)

 * implemented first draft of conditions in listview as extraCol; condition: {type, typeId, status}; currently only inpmplemented in the item-brick
 * obligatory oneliners all over the place fixing stuff that boggles the mind
2013-07-07 23:25:15 +02:00
Sarjuuk
79ee421833 Creatures:
- add hardcoded Totem-DisplayIds

Spell:
- fixed amount/damage not being displayed, when spell had createItemId set but no effect to create it
- respect interactivity for constructs in tooltip
- parse playerLevel as textVar, if the constuct cant be evaled
- fixed functionality to change level on tooltips granting ratings
- added related tabs: 'modified by', 'modifies', 'used by item', 'used by itemset', 'see also'

* some minor cleansing in js-tooltip code
2013-07-07 01:21:47 +02:00
Sarjuuk
9c9d03dbb8 Achievement:
- improved handling of rewards

Spell:
- moved calcuation of effectValue to separate function, use realPointsPerLevel
- eval: applied proper format, fixed evalable string when facing multiple signs in a row
- display modelviewer for summons

Titles:
- looks like titles behave differently when using "faction" or "side"

Achievement:
- implemented rewards (which i have forgotten for almost 2 years)

* reworked pet-setup
* typos and forgotten changes, that broke code here and there
2013-07-06 16:33:30 +02:00
Sarjuuk
a3f16f0e0d 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
2013-07-02 23:02:04 +02:00
Sarjuuk
4c974f87c5 display modelviewer button for spells with transform, mount or shapeshift
parsed SpellShapeshiftForm.dbc to db and added Horde displayIds manually
use table for modelIds and spells speciffic to this form
2013-07-01 10:28:19 +02:00
Sarjuuk
bbfc4f5820 moved articles to template-class .. and am fed up with smarty by now.. 2013-07-01 10:28:17 +02:00
Sarjuuk
3d66eacb90 implemented Itemset detail page
- while the code and strings are there, no rules have been set concerning availability

User:
 - HTTP_ACCEPT_LANGUAGE may not be set.

Compare:
 - removed some relic code, that, once uppon a time, was used to link virtual item sets with real item sets or something..

Titles:
 - fixed a few forgotten changes

Lang:
 - hide DND-entries for locks

BaseType:
 - improved getField to automaticaly cast numerics to float
 - improved __construct to check for numeric instead of int
2013-06-23 22:11:39 +02:00
Sarjuuk
88bfae9c0a move global cuFlags left by 24b. They were unique to achievements but should be applicable to all types 2013-06-19 22:29:21 +02:00
Sarjuuk
08f4d84b6d objects:
- preparing tooltips (locks to Util & localization)
quests & npcs:
 - implemented tooltips
spells:
 - fixed tooltip-header
 - stat gain inclued periodic healing auras (item: 17743 for example) and spellHeal no longer applies spellPower
achievements:
 - path is less prone to errors
events:
 - disabled tab as it was causing js-errors

obligatory cleaning up everywhere
2013-06-19 21:41:15 +02:00
Sarjuuk
513c9d9114 split field 'flags' in announcements into distinct properties, mark jsVars with a '$' like in every other case 2013-06-19 20:43:16 +02:00
Sarjuuk
21f50ae2cd * tabs 2 spaces in some *.js and *.css
* updated Summary.js (Item Comparison)
 - can now manage custom weightscales, when logged in
 - can now apply weightscales to rank search results
 - CAN NOT yet search for items with a certain scale alone, as i haven't figured out yet how to design the database for that
* sorted and commented basic.css
* some missing imagery
* some cleanup

(my todoStack just got less inhuman in size)
2013-06-18 23:31:58 +02:00
Sarjuuk
b26accb32a tabs to spaces *siiigh* >.< 2013-06-01 17:25:16 +02:00
Sarjuuk
86a85f4925 fixed erronous formating of armor & block on items 2013-06-01 17:12:58 +02:00
Sarjuuk
aef069e919 - implemented tooltips for NPCs
- global STATIC_URL defined to be also usable in script
2013-06-01 16:56:05 +02:00
Sarjuuk
8a11a3d459 all localizations are up to date again; merged talent-specific terms into general file 2013-06-01 13:17:07 +02:00
Sarjuuk
e5df5260fd * updated names of skillLine from dbc (minus a few typos)
* prevent reference errors when fetching globals for nonexistant spell
2013-05-31 14:53:18 +02:00
Sarjuuk
127231e01b removed relic time measurement code 2013-05-31 08:12:09 +02:00
Sarjuuk
86c751a77e added overlooked overlay-sizes for mapper .. note to self .. update map generator 2013-05-30 23:57:22 +02:00
Sarjuuk
e603a0cff8 fiddling with spell-tooltips, parsing some more bitmasks and ratings in the spellEffects, fixed several typos, tabs to spaces in js-locales, implemented flightpath-maps for ?zones 2013-05-30 23:54:35 +02:00
Sarjuuk
2efd3924f9 minor faction icon fuckup 2013-05-30 18:58:08 +02:00
Sarjuuk
5f2cd9efec zones-listview: working draft 2013-05-21 23:14:25 +02:00
Sarjuuk
8b7ca25f08 misc fixes 2013-05-21 23:03:54 +02:00
Sarjuuk
3bb5b83baf got rid of default-tab in listviews 2013-05-21 23:01:38 +02:00
Sarjuuk
c5b81bd6e7 icon lost & found 2013-05-21 22:53:32 +02:00
Sarjuuk
4238395921 updated packed database .. also some minor fixes 2013-05-16 19:44:19 +02:00
Sarjuuk
86387f7707 Spells: initial implementation of DetailPage, ListPage, Filter, Search
Spells:
 - improved tooltips to use a less table-dependant layout
 - defined the missing fulltext-variables
 - buff or tooltip are only reandered for the current spell
 - reduced redundancy in buff / tooltip-code

some ToDos:
 - no tabs on the detail-page implemented yet (used-by, affected-by, ect)
 - localization for frFR, esES and ruRu is .. lacking and will probably be commited with the point above)
 - a full search runs for almost 2sec and i haven't implemented every type yet >.< .. spells are too greedy
 - in some cases $d must supply a time unit, in most cases it does not .. why..?
 - sources can be improved .. anything related to items is still missing
2013-05-13 00:50:10 +02:00
Sarjuuk
cbd27c67b3 Types:
- added some more lasses for (for now) static use

Achievements:
 - moved setup to separate file (not included yet (and shouldn't have been))
 - unified use of the infobox.tpl

Items:
 - Tooltip-layout changes, when used as standalone or incorporated in other tooltips. This can now be considered.

Util:
 - added utf8-safe Util::ucFirst()
 - added Lang::getRequiredItems() for use with spell - equippedItem[Sub]Class

Templates:
 - minor wording fix (link -> links)

Markup:
 - [class=X], [race=X], [money=X] added (i really shouldn't have done this)
 - [color=X] now also accepts r1 - r4 as parameter

obligatory minor stuff here and there
2013-05-13 00:24:30 +02:00
Sarjuuk
732226b44a BaseType:
- dropped property "names" and changed getField to return localized Fields if specified. Dropped stupid getNameFieldName() in the process as it was now obsolete.
 - made property "matches" private. Access through getMatches() that will execute the query _only_ when needed (which is basically always anyway (so much for optimization))

SpellList: parsing
 - ""fixed"" behavior of the amount-switch $l when used on russian text. It has 3 options instead of 2, no idea what the last one is for though
 - fixed extra leading whitespace occuring when parsing formulas

Lang:
 - removed offset from getMagicShools(), apparently it is unneeded :o

Util:
 - changed the output of formatTime() in the long version to be more correct in layout
 - initialized values in parseTime() to prevent empty strings returned by formatTime()
 - added asBin() and asHex() - helper to improve display of bitmasks (Spells are coming!)
 - update Spell-Effects/Auras and added misc strings to display different MiscValue-content

Filter:
 - removed escapes from $_POST-handler. If the input is erronous it should be corrected/ignored/noted by the $_GET-handler

Smarty:
 - added optinal parameter to saveCache(), loadCache() to better handle filter variables

Search:
 - changed $maxResults to 10 for OpenSearches in an effort to lower execution time and appied limits to all queries
 - changed result calculation for OpenSearch. It should now stick to it's limit of 10 results for the list
 - simplified WorldEvent search

global.js:
 - backported function to parse title-tag of dfn-elements into mouseover-tooltips
 - shortened document.getElementByTagName(x) calls to gE(document, x)
2013-04-26 17:02:35 +02:00
Sarjuuk
1142220674 Filters:
- make offset optional, when converting list to mask

Items:
- fixed display of inventory type for robes and ranged weapons

Spells:
- parsing: $charLevel and $interactive are now properties of spell.
- parsing: fixed durations, passing the time-unit seperately to allow for evaluation of the actual value
- parsing: fixed gender-specific formating [ >male/female< to <male/female>]
- parsing: usage of is_numeric() instead of (float) as 0 is a fucking valid numeric (caused some formulas to not be evaluated *grrr*)
- parsing: lastValue-references now skip to the next previous \d instead of being stopped by random \w (like time units)
- implemented forgotten display of runes for spellCost
- fixed castTimes for most hunter shots (they are -1000 for some reason)
- fixed display of required stances (sometimes they are not actually required but show, when you are _allowed_ to use a spell in certain forms)
- improved formating of tooltips-js (no visual change)

ListViews:
- pass '_truncated' separately. there are nough cases in which 'note' gets send without truncated results

misc changes here and there
2013-04-20 16:16:29 +02:00
Sarjuuk
f8b8ee218c moved check for valid url-params to Util (will be reused in spells, ect) 2013-04-20 15:48:35 +02:00
Sarjuuk
b6c0fa1b89 * improved conditions for BaseType to accept conditions in addition to explicit field names
this allows for better flag matching i.e. [(flags & 0x4) = 0]
  furthermore it is now possible to group conditions to a subset with a different link

* hasDiffCategories() -> hasDiffFields(array $fields)
  now returns a bitmask of the array keys what field does diff
2013-04-20 15:33:05 +02:00
Sarjuuk
4d626472b1 implemented Pets
lisview, searcheable, setup
detail page missing

minor:
- show icon for achievements in open search
- show high-quality items first in open search
2013-03-26 21:21:23 +01:00
Sarjuuk
a3f1f2b549 misc fixes:
spell:
 - removed weired break from tooltips
 - fixed time units being omitted by intval and subsequent cast to int

achievement:
 - casting id to int to avoid string-comparison in mysql (sped up load a lot)

localization:
 - fixed malformed file

infobox:
 - show video-options only when logged in

filter:
 - allow underscores in search (icon search)

search:
 - really fixed prepended quality for items
2013-03-26 20:55:42 +01:00
Sarjuuk
77889459b5 setup script for itemsets
a few things to consider:
 - the virtual Itemset-Ids will not be the same as wowheads. Which dosn't really matter imho..
 - the Arena-Sets all have their base names. I've to admit, i'm not too fond of the idea to collect 40 prefix-strings and attach them manually. But i see no other option.
 - availability for players is not supported. I dread the thought of crawling through vendor and loot-tables for every .. single .. item!
2013-03-23 16:40:47 +01:00
Sarjuuk
6c25f69c16 implemented pages:
- Achievement / Achievements (filtrable)
 - Classes
 - Currencies
 - Itemsets (filtrable)
 - Races
 - Title / Titles
 - Events
2013-03-23 16:03:12 +01:00
Sarjuuk
c045fe1081 implemented generic filters
- what which index does needs to be implemented in the implementation
- differences to wowhead
   * strings in criteria are more lenient and will also work with partial matches
   * the ? and * wildcards are supported
2013-03-23 15:58:35 +01:00
Sarjuuk
58316679bf ordered bricks somewhat
simple listview-pages now use one shared template (instead of having the same file multiple times)

some bug fixing here and there
 - achievement: faction is no longer out of range (need to reparse the faction :/)
 - item: quality is prepended to the name again and wont be left out in case of heirlooms (is 0)
 - general: forgot to change some error()-calls in index
 - and some more wich i forgot..
2013-03-23 13:40:15 +01:00
Sarjuuk
041aea1a85 moved template-class from kernel to util .. which is now in dire need of reordering :/ 2013-03-13 23:07:55 +01:00
Sarjuuk
e14c3b61d5 added requisite-events .. mostly for future use
do not display empty dates in listview
2013-03-13 23:05:06 +01:00