Commit Graph

57 Commits

Author SHA1 Message Date
kaelima 3d14384c32 Merge git://github.com/TrinityCore/TrinityCore into 4.x
Conflicts:
	dep/PackageList.txt
	sql/base/auth_database.sql
	src/server/authserver/Server/AuthSocket.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Chat/Commands/Level1.cpp
	src/server/game/Chat/Commands/Level3.cpp
	src/server/game/DataStores/DBCEnums.h
	src/server/game/DataStores/DBCStores.cpp
	src/server/game/DataStores/DBCStores.h
	src/server/game/DataStores/DBCStructure.h
	src/server/game/DataStores/DBCfmt.h
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/DynamicObject/DynamicObject.cpp
	src/server/game/Entities/GameObject/GameObject.cpp
	src/server/game/Entities/Item/Item.cpp
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Object/Updates/UpdateData.h
	src/server/game/Entities/Pet/Pet.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Transport/Transport.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Globals/ObjectMgr.h
	src/server/game/Guilds/Guild.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/QuestHandler.cpp
	src/server/game/Loot/LootMgr.cpp
	src/server/game/Miscellaneous/SharedDefines.h
	src/server/game/Quests/QuestDef.cpp
	src/server/game/Server/Protocol/Opcodes.cpp
	src/server/game/Server/Protocol/Opcodes.h
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/Spell.cpp
	src/server/game/Spells/Spell.h
	src/server/game/Spells/SpellEffects.cpp
	src/server/game/Tickets/TicketMgr.cpp
	src/server/scripts/Commands/cs_gps.cpp
	src/server/scripts/Commands/cs_modify.cpp
	src/server/shared/Database/Implementation/CharacterDatabase.cpp
	src/server/shared/Logging/Log.h
	src/tools/map_extractor/CMakeLists.txt
	src/tools/map_extractor/System.cpp
	src/tools/map_extractor/mpq_libmpq04.h
	src/tools/vmap4_extractor/CMakeLists.txt
2012-05-30 08:01:02 +02:00
click 5411e1ce52 Core: Clean up whitespace and tabs in the base sourcetree 2012-02-18 16:52:08 +01:00
kiper 8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
QAston afc18461d7 Core/SpellScripts: Add BeforeCast, OnCast and AfterCast hooks to SpellScripts. 2011-12-31 13:11:12 +01:00
Spp b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
QAston e949ad3adb Core/Spells: spell effect handling improvements
* Call spell effect handlers in 4 modes:
   - SPELL_EFFECT_HANDLE_LAUNCH - called when spell is launched (cast just finished)
   - SPELL_EFFECT_HANDLE_LAUNCH_TARGET - called when spell is launched for each target in spell target map
   - SPELL_EFFECT_HANDLE_HIT - called when spell hits its destination
   - SPELL_EFFECT_HANDLE_HIT_TARGET - called when spell hits it's target from spell target map
*Correctly implement SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL
*Remove spell system hacks which became obsolete with this commit
Core/SpellScripts:
add OnEffectLaunch, OnEffectLaunchTarget, OnEffectHit, OnEffectHitTarget hooks for new effect handle modes and remove OnEffect hook.
A generic rule of thumb how to update your scripts (will work for nearly all cases) for spell system noobs:
if your spell script used GetHitXXXX function, you need to use OnEffectHitTarget, otherwise use
OnEffectHit
2011-09-25 13:29:50 +02:00
Spp af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
QAston b0fe236265 Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo
*GetSpellProto is now GetSpellInfo
*SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].*
*sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo()
*SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff()
*SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class.
*GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections
*code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
2011-07-26 23:09:28 +02:00
click 1aff85f541 Core: Cleaning up hungarian notation - Phase8: pSummon -> summon (also did related hits) 2011-07-03 00:28:03 +02:00
click db045c40ad Core: Cleaning up hungarian notation - Phase5: pKiller -> killer 2011-07-02 23:58:05 +02:00
click f676585cac Core: Cleaning up hungarian notation - Phase5: pWho -> who 2011-07-02 23:53:38 +02:00
click 169f5da8c3 Core: Cleaning up hungarian notation - Phase2: pPlayer -> player 2011-07-02 22:52:42 +02:00
click f91ee24184 Core: Start cleaning up hungarian notation - Phase1: pCreature -> creature 2011-07-02 22:18:03 +02:00
Spp- 6fd41ae50e Scripts: Reorder file names in Commands/CMakeList file and cosmetic changes in all scripts 2011-06-30 14:24:56 +02:00
click 158966dc79 Core: Codestyle cleanup 2011-06-11 22:35:29 +02:00
QAston 506fedcfea Changes missing from last commit. 2011-05-31 20:28:36 +02:00
QAston 7b5b95966e Core/AuraScript: Add DoCheckAreaTarget hook to allow explicit area aura target selection. 2011-05-31 20:24:44 +02:00
kaelima ae0d349a3c Core/Defines: Update enum TextEmotes, values and names from client. (These emotes comes in CMSG_TEXT_EMOTE). 2011-05-30 22:57:37 +02:00
QAston 42a20f14ef Core/Auras: Use existing aura object on aura reapply/stack increase instead of creating a new one.
You can hook on reapply/stack event by checking for AURA_EFFECT_HANDLE_REAPPLY aura handler mode, AURA_EFFECT_HANDLE_REAL is now not triggered on aura refresh/stack.
2011-05-29 13:18:47 +02:00
QAston a1b8fd2054 Core/AuraScripts: Add AfterEffectRemove and AfterEffectApply hooks, to allow safe triggering of spellcasts or other actions which may call linked events while OnEffectApply and OnEffectRemove are still there for overriding the way effect is handled on target. 2011-05-25 17:13:32 +02:00
leak 1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
Shauren 8568f19e5d Scripts/Examples: Corrected code style in spell script examples 2011-04-27 18:58:40 +02:00
click 9762c17833 Core/Buildsystem: Update copyright-headers for 2011, and adjust with the correct teamname as well. 2011-04-27 18:17:00 +02:00
Shauren c2690f748b Scripts/Spells: Implemented UnitTargetHandler spell script hook, it can be used to filter area targeting spells 2011-01-21 23:42:51 +01:00
Machiavelli deed0d0781 Core/General: Fix some comment style. //* to // *. Fixes certain code display errors on nano. Thanks to Aokromes for pointing out. 2011-01-16 12:23:17 +01:00
Spp bd2728eb74 Core: Fix some warnings 2011-01-11 11:18:00 +01:00
Machiavelli 957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
QAston 8cd2c73e45 Core/ScriptSystem: Add OnEffectManaShield and AfterEffectManaShield hooks to AuraScript class. Usage of these is the same as similar Absorb hooks.
Scripts: Move Incanter's Absorbtion script from Unit::CalcAbsorbResist to AuraScript.
2010-12-30 19:05:19 +01:00
QAston c8adcc95f9 Core/Unit: Move spell specific code from Unit::CalcAbsorbResist to AuraScripts. 2010-12-30 02:03:46 +01:00
QAston ef968f4b15 Core/Unit: Big cleanup in Unit::CalcAbsorbResist
Core/AuraScript:
	Fix compile time check for AuraScript functions
	Remove AuraApplication from hook functions parameter list, use GetTarget() and GetTargetApplication() instead
	Add OnEffectAbsorb hook
Scripts: move handlers of Spell Deflection, Savage Defense, Primal Tenacity, Nerves of Steel, Astral shift from core to scripts.

--HG--
branch : trunk
2010-12-27 20:14:54 +01:00
Shauren 928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
Shauren 0f3b9019a8 Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG--
branch : trunk
2010-12-22 21:25:23 +01:00
Spp afb3e790de Core/Scripts: add example_commandscript as an example of how to use commandscripts to add your own commands to the core
Patch by Paradox
Closes issue 4630

--HG--
branch : trunk
2010-11-03 08:44:03 +01:00
click 34eed2de3f Core/Scripts: Fix menu clearing in onGossipSelect()-sections for some scripts (including examples) - patch/fix by Paradox
Closes issue 4524

--HG--
branch : trunk
2010-10-21 20:12:33 +02:00
QAston f8a4312701 Core/ScriptSystem: Add compile time type check of function assigned to hooks -
prevents incorrect function calls. Since this rev you have to put
PrepareAuraScript(<yourscriptclassnamehere>) at the beginning of every aura
script.

--HG--
branch : trunk
2010-10-08 22:33:21 +02:00
QAston 1760e42e2c Core/ScriptSystem: Add compile time type check of function assigned to hooks - prevents incorrect function calls. Since this rev you have to put PrepareSpellScript(<yourscriptclassnamehere>) at the beginning of every spell script. Yes, i know it's unhandy, but unfortunately C++ preprocessor is very limited, so you have to do that extra work each time you write a script:(.
--HG--
branch : trunk
2010-10-08 21:33:44 +02:00
click bf664b7a44 Cleanup/Core: Remove whitespace and tabs
--HG--
branch : trunk
2010-09-12 01:40:27 +02:00
click 8823a91cdc BuildSystem/ALL: Remove unused custom code (most are duplicated as in examples)
+ remove fileglobbing for scripts (less error-prone)
+ Create proper lists per "scriptsection"
NOTE! This change requires new files (cpp/h) to be MANUALLY ADDED to <type>/CmakeLists.txt

--HG--
branch : trunk
2010-09-05 17:19:41 +02:00
Spp 9e4357c9ad Core: Fix more warnings
--HG--
branch : trunk
2010-08-24 14:44:56 +02:00
QAston 07a3a1254b *Add AuraScript class for scripting aura objects - scripts are registered same way as SpellScripts, bound to SpellScriptNames table. For more details see example_spell.cpp and SpellScript.h
*Rename SpellHandlerScript to SpellScriptLoader, EffectHandlerFn to SpellEffectFn, HitHandlerFn to SpellHitFn, SpellScript::EffectHandlers to SpellScript::OnEffect, these changes were neccesary to prevent namespace collisions, happily you can solve these by simple find and replace
*Make spells 66244 and 5581 example scripts.

--HG--
branch : trunk
2010-08-24 00:10:49 +02:00
Spp 58e94dcb9d Core: Fix more warnings
--HG--
branch : trunk
2010-08-23 14:10:24 +02:00
QAston 6714feb3ee *Add script hooks for SpellScript class - now you can use BeforeHit, OnHit, AfterHit hook lists.
--HG--
branch : trunk
2010-08-21 20:18:54 +02:00
click 1f80c7b3c0 Sourcefile sleanups -> tabs to spaces, remove whitespace - also update the cleanupscripts very slightly
--HG--
branch : trunk
2010-08-08 19:45:53 +02:00
azazel 590199d8e1 * Rename InstanceData to InstanceScript
* Rename *mgr to their new names in scripts project
* Mass convert all the scripts (NEEDS THOROUGH TESTING, because it was done automatically) Please, report bugs on issue tracker.

--HG--
branch : trunk
rename : src/server/game/Instances/InstanceData.cpp => src/server/game/Instances/InstanceScript.cpp
rename : src/server/game/Instances/InstanceData.h => src/server/game/Instances/InstanceScript.h
2010-08-08 22:54:58 +06:00
XTZGZoReX bcfc58a72d * Script-side changes for my last commit.
--HG--
branch : trunk
2010-08-07 13:46:08 +02:00
XTZGZoReX c2ca2e1c98 * Converted example scripts to the new format.
--HG--
branch : trunk
2010-08-07 00:06:55 +02:00
silinoron f9fdc660de convert example spell script, too.
--HG--
branch : trunk
2010-08-06 11:41:32 -07:00
silinoron 0cdeafc2eb Comment out body of AddSC_example_spell_scripts() to get rid of a loading error.
--HG--
branch : trunk
2010-08-01 17:16:31 -07:00
QAston fce1f5b014 *Extend API of SpellScript by Dest and Damage/Heal setters and getters.
*Make some SpellScript function names shorter.

--HG--
branch : trunk
2010-07-25 16:23:57 +02:00
QAston 7308c112bb *Add some more comments to SpellScript methods
*Remove forgotten error log

--HG--
branch : trunk
2010-07-25 02:05:12 +02:00