Thread: Miscellaneous Hacks - WoW Character BBCode
View Single Post
  #70  
Old 02-28-2008, 10:36 PM
sweede's Avatar
sweede sweede is offline
 
Join Date: Jan 2007
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sweede View Post
Just as a notice, I plan on updating this in a few days.

Changes will include a more absract method of retreiving and storing character data from the armory. This will be a set of class methods that anyone can use to get , cache and display armory data.

Much better method of selecting what attributes to display. I'm also currently trying to figure out how to make character "roles" work, but am unsure if that would be a possibilty or even a wise idea, due to the amount of setup on the end users part it would require.

I would estimate a week or two before i have an update ready. If anyone has suggestions or any requests, let me know.
Just a little info on this progress.

I have the base classes that retreive and save the character information into the database. Everything is saved and will be in 2 tables (one for basic character information such as name, class, realm, etc and the other table is for all other stats).

Now i'm going to have to takle the hardest part, which is retreiving that information from the database.

I havent fully decided how to retrive that info. I know i'll have a subclass for each character class that will gather class specific details, but what to do about hybrid classes (such as a druid, which fits into dps caster, melee, tank, healer) , im not yet sure.

The planned usage of these classes will be something like,

$armory = new character(character, server, locale);
$armory->character_process();
$armory->get_stats("basic");
$armory->get_stats("melee","defense");

$armory->character_class; // would be the characters class
$armory->character_spec; // would be an array of points spent in the tree + the main trees name
$armory->health; // health, obviously
$armory->secondary; //rage or mana

Then for things like, crit you would have
$armory->crit_chance['melee']['perc']; // % crit chance, main hand melee
$armory->crit_chance['offhand']['value']; // crit rating (off hand).
$armory->crit_chance['spell']['perc']; // Returns %% of whatever your main specs crit chance is. i.e. if your link a mage and he's a frost mage but fire crit is 30% and frost crit is 28%, it will return 28%

Everything from the armory XML page will be available.

This will be a seperate include and will be available for use in any addon that you want to get armory character data from.

With the new class methods, i'll be able to allow a better degree of customization.

It may take a bit longer than planned, since i only really have one day a week to work on coding this.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01189 seconds
  • Memory Usage 1,770KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete