Commit Graph

297 Commits

Author SHA1 Message Date
Brian
a95dd226e4 * Properly display missing vehicle IDs on startup
--HG--
branch : trunk
2010-02-18 02:07:20 -07:00
Brian
bea79b0711 * Add error checking for vehicle IDs that are in creature_template but don't
* exist in Vehicle.dbc. This *WILL* cause the client to freeze / hang.
* Look on TDB in the "Core related DB content" forum for a query to clean
* these up.
* Thanks to MaXiMiUS for the slap in the face :)

--HG--
branch : trunk
2010-02-17 00:51:19 -07:00
Brian
8930098acb * Add support for CONDITION_QUEST_NONE (14) as a loot condition and gossip
* condition. If set the player must never have taken or completed the quest
* listed in value1

--HG--
branch : trunk
2010-02-16 21:21:52 -07:00
n0n4m3
bcd4a48328 Removed stupid/not needed file Spellid.h.
--HG--
branch : trunk
2010-02-15 18:23:39 +01:00
n0n4m3
490f4bf7ec Fix some problem with Guild Bank after switch to client version 3.3.2, also cleanup code. Thx TOM_RUS.
--HG--
branch : trunk
2010-02-15 14:30:12 +01:00
Brian
486c00891b * Core switch to client 3.3.2 (11403)
* Credits (in no particular order) to:
* n0n4m3, raczman, manuel, Spp, Malcrom, Teacher, QAston, Tartalo,
* thenecromancer, Xanadu, Trazom, Zor, kiper
* Additional credits to:
* TOM_RUS and NoFantasy from MaNGOS
* Thanks for testing Aokromes and XTElite1
* SoTA still needs some work, but is very playable (huge thanks to raczman and
* kiper)
* To upgrade, you need to apply all SQL from sql/updates/3.2.2a_old from the
* last rev you are on
* and then apply all SQL from sql/updates/3.3.2_old to char / realmd / world
* DBs
* Known problem with guild banks.

--HG--
branch : trunk
2010-02-14 19:13:14 -07:00
Xanadu
a5d1bc77ab A great purge of obsolete macros.
--HG--
branch : trunk
2010-02-05 00:31:28 +01:00
QAston
a1256d88ee *drop spell_elixir table
*add spell_group table for storage of groups of spell (kinda obvious, isn't it?) and populate the table with converted spell_elixir table data
*the table is going to be maintained by core team
*fix percentage display at spell_ranks table loading
*add TARGET_UNIT_CASTER to allowed learn spell targets in npc_trainer table, thanks to Aokromes for noticing the issue.

--HG--
branch : trunk
2010-02-01 19:22:32 +01:00
QAston
ac388e6f21 *Add support for spells in npc_trainer table with multiple SPELL_EFFECT_LEARN_SPELL, this fixes problems with learning such spells from trainers.
--HG--
branch : trunk
2010-01-31 17:24:13 +01:00
Brian
038c1ad776 * Added check in ObjectMgr to allow RewSpellCast=-1. Thanks QAston
--HG--
branch : trunk
2010-01-29 12:54:30 -07:00
Anubisss
d9cb070215 Implement QueryResult_AutoPtr type which is ACE's reference counted auto_ptr(ACE_Refcounted_Auto_Ptr) for QueryResult pointers.
Use this auto_ptr for every DB queries(except QueryNamedResult yet).

This patch guarantees NO memory leaks from QueryResult pointers.

Thanks to raczman for the idea and for the helping to make this patch.

--HG--
branch : trunk
2010-01-23 14:45:58 +01:00
Brian
7162dcd475 * Backed out changeset c7c6faf26cbd
* A different solution to damage will be implemented
* You will need data from your DB provider if you don't have a backup

--HG--
branch : trunk
2010-01-21 18:38:49 -07:00
win32
2572e9ef8e * Add support for basedmg and baserangeddmg values in creature_classlevelstats.
* Remove mindmg, maxdmg, attackpower and ranged field in creature_template and add Dmg_Mod, Rangeddmg_Mod field.

--HG--
branch : trunk
2010-01-21 13:48:27 +02:00
QAston
f5dea61b66 *Remove some of no longer needed debug code.
--HG--
branch : trunk
2010-01-18 23:47:26 +01:00
QAston
9a7746c9fc *Add some debug info to trac reason of assertion fail in Unit destructor.
--HG--
branch : trunk
2010-01-18 18:42:36 +01:00
n0n4m3
99f66a6bc9 Updated copyright for new year.
--HG--
branch : trunk
2010-01-16 20:19:18 +03:00
n0n4m3
9be16cf605 Some replacements .count to .find for better performance - original patch by zhenya.
--HG--
branch : trunk
2010-01-16 19:18:53 +03:00
Anubisss
8a78102a1c Fix a mem leak in ObjectMgr::LoadWaypointScripts(), http://pastebin.com/f701c1e11
--HG--
branch : trunk
2010-01-16 00:37:56 +01:00
XTZGZoReX
26e11448dd * Update structure for SMSG_ADDON_INFO and add some sort of basic handling for incorrect addon CRCs (anti-cheating).
* Fix CRLF in MovementHandler.cpp.
* Move some handlers/senders to correct place.

--HG--
branch : trunk
2010-01-15 19:50:27 +01:00
XTZGZoReX
1fcafbc938 * Set creature_template.unit_class to 1 (UNIT_CLASS_WARRIOR) if the value is wrong to prevent issues in CreatureBaseStats::Generate*() functions.
--HG--
branch : trunk
2010-01-14 19:20:11 +01:00
XTZGZoReX
91ee03d9bf * creature_template.unit_class cannot be 0 - added check for this.
--HG--
branch : trunk
2010-01-14 18:08:42 +01:00
XTZGZoReX
ebc5901161 * Fix crash when there's no creature_classlevelstats entry for a creature level.
* All this really does is fill in default values of 1.. If you got custom content, you'll have to fill in the creature_classlevelstats table yourself. This patch doesn't automagically fix stats for you.

--HG--
branch : trunk
2010-01-11 18:13:21 +01:00
XTZGZoReX
a66152215e * Add support for base armor values in creature_classlevelstats.
* Change the table structure to be more core-friendly.
* Remove armor field in creature_template and add Armor_mod field.
* Also add static CreatureBaseStats::GetBaseStats() function for scripts.

--HG--
branch : trunk
2010-01-10 22:02:03 +01:00
Rat
5b6079ea67 *cleaned up SharedDefines
--HG--
branch : trunk
2010-01-10 16:27:47 +01:00
QAston
8e9d2cdf01 Update aura system:
* Change system logic - unify Auras, AreaAuras and PersistentAreaAuras:
  * Aura has now its owner - which is the WorldObject, which applies aura (creates AuraApplication object) dependant on aura radius, and effect type
  * Owner can be Dynobj (DynObjAura class) for PersistentAreaAuras, or Unit (UnitAura class) for Area and nonArea auras
  * Aura data is shared for all units which have AuraApplication of the Aura
   * Because of that AuraEffect handlers , and periodic tick functions can't modify AuraEffect object (they are const now)
  * Remove spell source and AreaAuraEffect classes
  * Add AuraEffect::UpdatePeriodic function, to allow periodic aura object modification (target independant)
  * Add AuraEffect::CalculateAmount and AuraEffect::CalculateSpellMod function, to allow non-default amount calculation
  * AreaAura updates are done in owner _UpdateSpells cycle
  * Since now you don't need to wait an aura update cycle to get area aura applied on it's correct target list
  * And you can access area aura target list
  * Add basic support for aura amount recalculation
  * Save recalculation state and base amount of auras to db
  * Add AuraEffect::CalculatePeriodic function to determine if aura is periodic, and to set correct tick number after aura is loaded from db
  * Add ChangeAmount function in addition to SetAmount function, to allow easy reapplication of AuraEffect handlers on all targets
  * Sort aura effect handlers in SpellAuras.cpp and .h by their use
  * Add check for already existing aura of that type to some AuraEffect handlers, to prevent incorrect effect removal
  * SPELL_AURA_CONVERT_RUNE and MOD_POWER_REGEN and MOD_REGEN hacky handlers are now implemented correctly
  * Send aura application client update only once per unit update - prevent unnecesary packet spam
 * Fix ByteBuffer::appendPackGUID function - it added additionall 0s at the end of the packet
 * Fix memory leak at player creation (not deleted auras)
 * Updated some naming conventions (too many to mention)
 * Added Unit::GetAuraOfRankedSpell() function
 * Remove procflags on aura remove, use Aura::HandleAuraSpecificMods instead
 * Added functions to maintain owned auras (GetOwnedAuras, GetOwnedAura, RemoveOwnedAura, etc)
 * Implement AURA_INTERRUPT_FLAG_LANDING
 * Implement EffectPlayerNotification (thanks to Spp)
 * Remove wrong aura 304 handler
 * Add better handler for death runes
 * Remove unnecesary variables from DynamicObject class, and cleanup related code, link dynobj duration with aura
 * Add GetAuraEffectTriggerTarget function in CreatureAi for special target selection for periodic trigger auras used in a script
 * Add many assert() procection from idiots using some functions in wrong way
 * I am to lazy to write here anything more
Thanks to Visagalis for testing this patch
PS: Do not make patches like this, please

--HG--
branch : trunk
2010-01-10 01:23:15 +01:00
p0wer
17e4fbd4ad Make the core boot alot cleaner. Fix some formating. Make custom attributes for spells show a bar and how much they are loading.
Overall fix 99% of display issues while core is booting.

--HG--
branch : trunk
2010-01-01 14:19:29 -06:00
p0wer
682cc9e034 Update DBCFilesCount to the current amount of DBC files. Also, if locale tables are empty, they will no longer display anything.
--HG--
branch : trunk
2009-12-31 18:49:13 -06:00
XTZGZoReX
2159602f27 * Remove useless CheckDB functionality. This does not belong in core in any shape or form.
--HG--
branch : trunk
2009-12-29 18:25:21 +01:00
n0n4m3
250a00cc1c Temporary revert 6743 commit. I fix this patch across 1-2 days.
--HG--
branch : trunk
2009-12-24 10:20:15 +01:00
n0n4m3
3fe0bc5254 Replaced time(NULL) on sGameTime.GetGameTime() this is used for better performance.
Original Timer.h divided into 2 parts. Shared project has no need to know about GameTime Singleton.
2 Identical structures with different types are now replaced with one generic templated structure and 2 typedefs.

--HG--
branch : trunk
2009-12-23 08:04:10 +01:00
Machiavelli
1bb648ccb9 Also add expansion and unit class to debug output when base stats for creature cannot be found to better pinpoint lack of DB support.
--HG--
branch : trunk
2009-12-22 22:14:04 +01:00
XTZGZoReX
9d342e2ab6 * More DB tweaks:
- Load GO even if it has no displayid - while it's wrong, it's not something that'll kill the client anyway.
- Don't warn about non-existing loot templates for GOs - this is to allow some WDB data to be filled in (GOs that have no spawns and thus no gameobject_loot_template entries).

--HG--
branch : trunk
2009-12-22 02:39:39 +01:00
XTZGZoReX
c0c72c28f6 * Better way to do the check in rev 6697.
00:33:56 | @runningnak3d: Leave a big message in the commit log to along the lines of "runningnak3d didn't know what the f*** he was doing" :)

--HG--
branch : trunk
2009-12-22 00:36:02 +01:00
Brian
76fb5ea713 * Added back support for 1000 value to indicate unlimited stacking in
* item_template.stackable
* Removed pointless check for stackable limit at item_template load.

--HG--
branch : trunk
2009-12-21 18:03:04 -07:00
Brian
0aa2069c73 * Added support for GAMEOBJECT_TYPE_TRAP and GAMEOBJECT_TYPE_SPELL_FOCUS to
* have modelid=0 since this is valid data for those GO types. More to the
* point removed the check at core load that resulted in an error being logged

--HG--
branch : trunk
2009-12-21 17:30:02 -07:00
Brian
86013b73b4 * Add support for extremely large stackable value in item_template.
* Patch by Kudlaty -- THANK YOU!

--HG--
branch : trunk
2009-12-21 14:58:31 -07:00
Brian
36d30faabf * Add support for RewSpellCast=-1. If -1 remove all auras applied to player at
* quest start.
* Patch by Kudlaty -- THANK YOU!

--HG--
branch : trunk
2009-12-21 14:48:30 -07:00
XTZGZoReX
67a4afc54c * Fix memory leak. Thanks to Anubisss for pointing out.
--HG--
branch : trunk
2009-12-20 23:55:22 +01:00
Brian
5300226fee * Added support for using a lookup table for creature mana / health
* As long as creature level, class, and the proper expansion they are from are
* set in creature_template, you will have 100% accurate health and mana.
* Research and base stats table done by Malcrom -- THANK YOU!
* Original patch by Kudlaty -- THANK YOU!
* Updated and enhanced by Machiavelli - THANK YOU!
* Optimizations by w12x, MrSmite, and XTZGZoReX -- THANK YOU!
* Final code updating for current rev by XTZGZoReX -- THANK YOU!

--HG--
branch : trunk
2009-12-20 20:23:18 -07:00
Brian
c4ac6323b0 * Added support for RepObjectiveFaction2 / RepObjectiveValue2 (opposite
* faction) IE: need to LOSE reputation with that faction.
* Original patch by Brian / Ported to latest rev. by Kudlaty -- THANKS!

--HG--
branch : trunk
2009-12-20 16:51:41 -07:00
Rat
6fe36efe0f *apply trinity style to whole source
*comment out all mangos to trinity defines
*this will make merging a little harder, but code will be more clear

--HG--
branch : trunk
2009-12-20 15:20:04 +01:00
win32
7c9f6b4bc3 Merge MaNGOS, Gossip System. Autor NoFantasy.
* DB support required
* Closes #859

--HG--
branch : trunk
2009-12-20 13:35:08 +02:00
n0n4m3
1f9530af21 Implement SCRIPT_COMMAND_KILL_CREDIT (8). by NoFantasy
--HG--
branch : trunk
2009-12-19 18:53:27 +01:00
maximius
dc1207139a *Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches..
--HG--
branch : trunk
2009-12-18 13:41:30 -08:00
n0n4m3
a7acabae8b Some fixes for core 3.2.2a
--HG--
branch : trunk
2009-12-17 14:55:19 +01:00
n0n4m3
eccf162be2 Fixed compile errors and some typos
--HG--
branch : trunk
2009-12-17 14:06:20 +01:00
win32
bf2c3fd8cf MaNGOS merge: Mail System.
* Store loot in mail_loot_template indexed by mail template ids.
* Implement proper creating mail text copy item from mail template based mail.
* Move send functions to new MailDraft class from WorldSession.
* Implement mails sending at player levelup.
* Autor VladimirMangos, converted by me.

--HG--
branch : trunk
2009-12-16 18:58:36 +02:00
maximius
654519d1a6 *Some cleanup (mostly whitespace changes)
--HG--
branch : trunk
2009-11-20 19:11:28 -08:00
maximius
27d3bf466c *Convert some tabs to 4 spaces.
--HG--
branch : trunk
2009-11-17 20:26:35 -08:00
Anubisss
f032a5ebf5 *Fix memory leakz in reload gm_ticket command.
--HG--
branch : trunk
2009-11-09 20:23:16 +01:00