
/\_*_/\_*_/\_*_/\ -- SimpleDruidBar ReadMe -- /\_*_/\_*_/\_*_/\

Addon type: Interface
Libraries used:
	ConfigManager1
	EventsManager1
	SimpleSlash1



-- == -- == -- Description of Functionality -- == -- == --

This Druid-only addon creates a mobile bar which displays the Druid's mana while in forms
which would normally be unable to view it (bear and cat). This is only an estimate, since the
real value is not available to the API, but the exact value of mana you receive per tick IS
available to the UI as of patch 2.0.3, and using that information it is possible to calculate
your real mana with almost full accuracy every time. You can drag the bar around, and you
can configure the size and opacity of the bar, and the display style of its text, with the
various "/sdb" slash commands.



-- == -- == -- History of Changes -- == -- == --

7.1.1 (Apr 28, 2008):
	- Now uses 2.4's GetSpellInfo() function to get the mana cost of shapeshifts directly, instead
		of having to extract it from the tooltip. This removes the need for the CommonParsingTooltip1
		library.


7.1.0 (Apr 11, 2008):
	- Now uses ConfigManager1 library for efficiency.
	
	- Miscellaneous code style updates.


7.0.0 (Nov 20, 2007):
	- Fixed an issue introduced by 2.3's swiftshifting capabilities where if you shifted out of
		a feral form and immediately back into that same form, such that the client never even
		realized that you left the form, the mana cost of the shapeshift would not be deducted
		properly, leading to an inaccurate display.
		
	- Now uses the EventsManager1, SimpleSlash1, and CommonParsingTooltip1 libraries for
		efficiency.


6.0.0 (1/14/07):
	- Reverted the changes from 5.0.0 since the GetManaRegen function is now once again
		available as of patch 2.0.3. This increases both accuracy and efficiency greatly.


5.0.0 (12/13/06):
	- Temporarily rewritten again due to Blizzard removing the GetManaRegen function (upon
		which version 4.0.0 relied heavily) on live servers. When the expansion is released, one
		more rewrite will allow the addon to use GetManaRegen once again.


4.0.0 (11/20/06):
	- Rewritten for efficiency and maintainability, and compliance with the new Burning Crusade
		scripting API. This version is not compatible with classic WoW; please use version 3.1.1
		instead for that.
	
	- Increased accuracy of the spirit portion of each mana tick by multiplying it by the time delta
		between pulses, similar to how mana/5sec gear has been calculated since 3.0.3.
	
	- Increased efficiency in parsing mana/5sec gear on your equipped items.
	
	- Now uses the new GetManaRegen function to determine whether Innervate or the Stormrage
		set bonus, or anything similar to those, are currently active. This increases efficiency, since
		we no longer need to parse the buffs to find such modifiers. (Note: This function cannot be
		used to get an accurate reading of the amount of mana per tick, because it rounds numbers
		upward, thus cutting off the important decimal portion of the mana tick.)
	
	- Added the ability to choose how the text overlay is displayed, with the new "/sdb text" slash
		command. You can choose to have it shown always (the default), shown only on mouseover,
		or shown never.


3.1.1 (10/14/06):
	- Fixed a bug where if you logged out or reloaded the UI in a feral form while at full mana the
		bar's text would display more than the maximum amount of mana upon logging back in.


3.1.0 (10/4/06):
	- Changed main event watched to UNIT_DISPLAYPOWER instead of PLAYER_AURAS_CHANGED,
		and moved the Innervate check to the UNIT_MANA event's algorithm. This has no effect on
		functionality, but reduces the number of checks needed to determine whether or not you're
		in a form, thus reducing resource usage.
	
	- Fixed an issue where if immediately after parsing an item with mana/5sec a blank slot
		was encountered, the slot would be counted as having the same amount of mana/5sec
		as the previously parsed item.
	
	- The time delta that is calculated to determine how much mana/5sec to add to each normal
		pulse is now multiplied by 1.15. Testing has shown this to prevent offsets which would occur
		over a long period of time (25+ ticks).


3.0.3 (9/14/06):
	- Fixed an incorrect multiplied value problem with mana/5sec gear, caused by the
		variations in mana pulse times. Sometimes they occur at 1.8 seconds, sometimes at
		2.2 seconds. Mana/5sec gear is now calculated with the time delta between pulses
		instead of an assumed 2.0 second constant. This should increase accuracy.


3.0.2 (9/13/06):
	- Fixed error that occurred when attempting to auto-disable on non-Druid characters.
	
	- Sped up inventory tooltip parsing process used to find mana/5sec gear and enchants.
	
	- Removed some old event code left over from the 2.x.x series.


3.0.1 (9/12/06):
	- Fixed calculations for mana/5sec gear to properly multiply by 0.4 (2 / 5), since such gear
		is designed to be added with normal mana pulses (every two seconds) instead of the
		listed number (five seconds). Previously, the full value of the gear was being added
		every two seconds, resulting in an overapproximation of your real mana.


3.0.0 (9/8/06):
	- Rewritten to use UNIT_MANA event instead of an OnUpdate routine, resulting in a very
		nearly perfect estimate of your real mana. In most cases, the disparity will be less than
		two points of mana.
	
	- Now accounts for the while-casting mana regeneration bonus from 3-piece Stormrage set.


2.4.1 (9/5/06):
	- Fixed a bug where if your Intellect decreased while in a form but then increased back to
		normal, your max mana display would go down again instead of up.


2.4.0 (8/31/06):
	- Added support for occurances of your Intellect (and therefore your max mana) changing
		while in bear or cat form.
	
	- Changed detection method for Innervate to improve efficiency.


2.3.1 (8/30/06):
	- Fixed a bug where if you died in bear or cat form, the chat feedback would report that
		your expected mana was zero.


2.3.0 (8/29/06):
	- Added a light grey background to the bar, so that the world behind it does not
		show through.
	
	- Changed shapeshift mana cost tooltip parsing to use SetShapeshift instead of
		SetSpell, resulting in a minor efficiency boost.


2.2.2 (8/22/06):
	- Changed TOC number to be compatible with 1.12 patch.


2.2.1 (7/9/06):
	- Fixed a bug that caused the display to show an incorrect (usually negative) number
		if your buffs changed while you were in bear or cat form.


2.2.0 (7/7/06):
	- Added support for mana/5sec gear, Innervate, the Reflection talent, and the
		Metamorphosis Rune (Blackwing Lair trinket which removes shapeshift cost).
	
	- To compensate for the unruly behaviour of spirit and general server lag, the
		constant the addon uses when in the formulae for calculating mana from spirit will
		now automatically be modified based on observed disparities in actual mana versus
		expected mana. If actual mana is lower than expected mana, the constant is boosted
		by 0.20; if actual mana is higher than expected mana, the constant is lowered by 0.20.


2.1.0 (7/7/06):
	- Now attempts to remember the proper current/maximum values between sessions, if
		you log out while in bear or cat form (preventing a proper initial reading the next time
		you log in). This also works with reloading the UI, but can create a large disparity
		depending on how long your system takes to perform the UI reload.
	
	- Now has an optional feedback print to show the disparity between your expected
		mana and actual mana upon shifting out of bear or cat form. Type "/sdb" to toggle.
		If the difference is ever greater than 10% of your total mana, please screenshot
		your current buffs and report that screenshot, as well as a list of your gear, talents,
		and spirit to me via one of the contact methods.
	
	- Fixed a rare bug that caused the blue mana bar to partially overlap its border.


2.0.0 (6/26/06):
	- Updated with readme, new programming paradigm, framework for localization, and
		full compatibility with the 1.11 patch.
	
	- Changed the mana regen formula from regen=(spirit/5)+15 to regen=(spirit/5)+10.88,
		since 10.88 is a more accurate constant.


Previous versions are not currently documented.



-- == -- == -- Developer Notes -- == -- == --

...none for now...



-- == -- == -- License and Contact Information -- == -- == --

This addon may be used or modified in any way which exhibits full compliance with the
World of Warcraft Terms of Service (TOS) and End User License Agreement (EULA), as well
as the rules of the website from which the files were downloaded. You may redistribute this
addon, but only if it is completely unchanged from the way it was found in the zip file. If you
wish to distribute a modified version, you must first obtain permission directly from me.

If you found a bug in this addon, want to provide feedback, want to help translate it, or even
just want to ask a question, please contact me using one of these methods:

Email address: saeris.sanoora@gmail.com
ICQ number: 119161819
AIM screenname: SaerisSanoora
Penny Arcade forums name: Saeris

If you use any other method, it might take me significantly longer to see your message and reply.

If you wish to support my efforts, you can donate via PayPal by following this link:
http://tinyurl.com/yo4asg



-- == -- == -- Addon Type System -- == -- == --

This addon uses a system in which there are three distinct types:
	Interface - These addons actually provide functionality to the user. They may be entirely self-
		contained, or they may make use of Library-type and Plugin-type. They are always top-level,
		meaning that they appear in the addons configuration menu at the character selection screen.
	
	Library - These addons exist simply to provide functionality to other addons of any type, and
		as their type name suggests, they may be shared between multiple other addons as a single,
		efficient source of the aforementioned functionality. A Library type addon may be embedded
		(included in a subdirectory folder with the client addon, usually "\libraries\" or something similar)
		or non-embedded (existing as a top-level addon, such that it appears in the addons configuration
		menu at the character selection screen). Both types have their advantages, but if you wish to
		reduce login time and monitor memory and CPU usage properly, you must use non-embedded
		Libraries. To do this, simply ensure that only a single copy of the Library is present in the entirety
		of the "Interface\AddOns" directory structure, and that this single copy is at the top level, as
		explained before. For convenience, all Library-type addons are prefixed with "Lib-" to identify
		them from the other types of addons.
	
	Plugin - These addons are generally optional, and "plug in" to Interface-type addons to provide
		additional functionality. They are always top-level, meaning that they appear in the addons
		configuration menu at the character selection screen. Most Interface-type addons which use
		plugins will not actually provide any significant functionality on their own. Generally, Plugins
		will include the name of their parent Interface addon in their own name to help identify them.

An addon's type and any libraries it uses are listed at the top of its readme file.



-- == -- == -- Versioning System -- == -- == --

This addon adheres to a #.#.# versioning format:

The first number (the 1 in 1.2.3) denotes the current major version. This number is
incremented when the addon's functionality or style of code changes so significantly
as to barely resemble previous versions. For Library-type addons, which provide
functionality to client addons, this number is also a guarantee that every release
within this major version will be backwards compatible with previous releases that
are also within this major version. In these cases, this number is actually a suffix on the
library's name. This is done so newer major versions of libraries will not overwrite
older ones, since those may still be in use by other clients.

The second number (the 2 in 1.2.3) denotes the current minor version. This number
is incremented when functionality is added, modified, or removed.

The third number (the 3 in 1.2.3) denotes the current subminor version. This number is
incremented when a release's purpose is to fix bugs or errors, or to increase efficiency
in some way, or to make a minor cosmetic adjustment.
