Commit Graph

45 Commits

Author SHA1 Message Date
XTZGZoReX
946adf469c *** New core <-> script library interface - complete rewrite of the old one.
* Removed the misdesigned on_events script/hooks.
* Lots of related cleanups and assertions.
* The interface is now fully object-oriented.
** Scripts no longer use function pointers.
** Scripts no longer use the general-purpose Script struct for everything.
** Script types are split into separate classes which must be inherited depending on what functionality is desired.
* Several script types have been added to allow extending functionality in a code-only manner (some script types require
  assignment in the recently added ScriptName columns in the database, though).
** SpellHandlerScript: Wrapper around spell scripts (returns new SpellScript objects (`spell_script_names`.`ScriptName`)).
** ServerScript: Allows scripting events that occur in the network layer.
** WorldScript: Allows scripting certain world-global events.
** FormulaScript: Allows hooking and interfering with core formulas.
** *MapScript: Allows hooking different map types (including world, instance, and battleground maps (`instance_template`.`ScriptName`)).
** ItemScript: Allows scripting of items (like the old interface (`item_template`.`ScriptName`)).
** CreatureScript: Allows scripting of creatures/AI (like the old interface (`creature_template`.`ScriptName`)).
** GameObjectScript: Allows scripting of gameobjects (like the old interface (`gameobject_template`.`ScriptName`)).
** AreaTriggerScript: Allows scripting triggered area triggers (like the old interface (`areatrigger_scripts`.`ScriptName`)).
** OutdoorPvPScript: Script which should return OutdoorPvP objects for use by OutdoorPvPMgr (`outdoorpvp_template`.`ScriptName`).
** CommandScript: Allows extending the in-core command table.
** WeatherScript: Allows scripting of weather changes (`game_weather`.`ScriptName`).
** AuctionHouseScript: Allows scripting of auction events.
** ConditionScript: Allows scripting of conditions (`conditions`.`ScriptName`).
** DynamicObjectScript: Allows scripting of dynamicobjects.
** TransportScript: Allows scripting of transport events (`transports`.`ScriptName`).
* OutdoorPvP objects are now created through scripts. This effectively means that they'll need to be moved to scripts
  before the they're functional again.
* The whole idea with this new interface is to allow expanding core functionality without touching core code. If further
  hooks are needed to expand functionality of the core, let us know; we'll add them, if we agree that it is appropriate
  to do so.
*** NOTE: The scripts project will _not_ build before it has been adapted to the new interface.
*** Thanks to everyone who helped out with related preparations and suggestions!

--HG--
branch : trunk
2010-08-06 19:23:43 +02:00
azazel
885fc368fd * Implement item limit category (based on changes by VladimirMangos)
* Additional check for HandleAutoBankItemOpcode (thanks to VladimitMangos)
* Properly show empty vendor list for empty item list (author: a1ien)
* More stricted checks for store operations (thanks to VladimirMangos)
* Prevent autostoring of not empty bags (thanks to L1ghtGu4rd)

Changes need testing. Please post bugs on our tracker.

--HG--
branch : trunk
2010-08-05 22:08:07 +06:00
QAston
e659c3faf3 *Update CMSG_USE_ITEM opcode to fit new clientCastFlag handling.
--HG--
branch : trunk
2010-08-04 22:52:35 +02:00
QAston
96fa91034f Missing part of r7dd45a0182 :(
--HG--
branch : trunk
2010-08-04 20:34:08 +02:00
QAston
2789b30d19 *Typofix - Relocate != SetPosition - fixes problems with visibility after changing zones.
--HG--
branch : trunk
2010-08-04 19:44:34 +02:00
QAston
96eb7c513f *Some more research about spell target flags - thanks to Zor for info.
--HG--
branch : trunk
2010-08-04 19:16:44 +02:00
Shauren
705de07e7e Fixed Carrion Feeder pet talent
Removed useless code for Wolverine Bite

--HG--
branch : trunk
2010-08-04 12:12:58 +02:00
Shauren
b7d34dcb53 Cleaned up item flags: separated item proto flags and item field flags
Implemented use of:
ITEM_PROTO_FLAG_PROSPECTABLE and ITEM_PROTO_FLAG_MILLABLE now checked instead of bag family mask
ITEM_PROTO_FLAG_SMART_LOOT for profession recipes, player has to have skillline and not know the recipe
ITEM_PROTO_FLAG_OPENABLE item has to have it set to use item_loot_template
ITEM_PROTO_FLAG_NOT_USEABLE_IN_ARENA if this is set item can never be used in arena
ITEM_FLAG_UNLOCKED marks unlocked items

Simplified BoA check for mail sending
Stackable items are no longer refundable
Removed useless code that always set ITEM_FIELD_FLAGS equal to proto flags
Unlocking items (lockpicking) is now blizzlike

--HG--
branch : trunk
2010-08-04 10:34:30 +02:00
QAston
891df4eccb *Drop m_intTargetFlags, correctly send TARGET_FLAG_SOURCE_LOCATION and TARGET_FLAG_DEST_LOCATION - fixes many spell visuals.
--HG--
branch : trunk
2010-08-02 20:05:22 +02:00
QAston
18dd177308 *Search for aura caster in our out of world in Aura::UnregisterSingleTarget().
--HG--
branch : trunk
2010-08-02 18:05:07 +02:00
QAston
ff575b7002 *Fixes in spell targets packet reading and writing.
--HG--
branch : trunk
2010-08-02 17:55:15 +02:00
QAston
2212eb604d *Add helpers for checking auras present on unit by type and spell affect mask
*Add linked SPELL_AURA_PERIODIC_HASTE to shadowform spell - by dr.tenma

--HG--
branch : trunk
2010-08-01 01:22:13 +02:00
QAston
48b360097c *use ASSERT macro instead of regular assert for better output.
--HG--
branch : trunk
2010-07-30 20:04:28 +02:00
Xanadu
1e5ce69d19 Merge
--HG--
branch : trunk
2010-07-30 03:43:09 +02:00
QAston
272e954a70 *Lock on RemoveAllAuras till all auras and applications are removed with all linked events they may cause.
*Add assertion after error log, just in case you've missed it.

--HG--
branch : trunk
2010-07-30 03:07:34 +02:00
Xanadu
eb852f5bbd * Added the option to specify target entry in conditions table for spells with AoE GO targets.
* A few examples where this is desirable are posted on the forum.

--HG--
branch : trunk
2010-07-30 01:51:33 +02:00
QAston
c44b601ac7 *Allow some spell effects to target units not in caster's map - fixes SPELL_EFFECT_SUMMON_PLAYER
--HG--
branch : trunk
2010-07-29 19:48:40 +02:00
Shauren
ade1bbdd62 Remade access_requirement table, now each difficulty mode for each instance has its own entry (for future Dungeon Finder development)
Added completed achievement as new requirement type
Removed obsolete access_id from areatrigger_teleport table
Implemented automatic downscaling of raid difficulty when requested mode does not exist
Changed dungeon_difficulty in characters table to instance_mode_mask saving both dungeon and raid difficulty in form (dungeon diff | raid diff << 4)

--HG--
branch : trunk
2010-07-29 18:11:41 +02:00
QAston
e232c0e235 *Cleanup in ObjectAccessor - this should fix some crashes
--HG--
branch : trunk
2010-07-28 00:08:21 +02:00
QAston
8e7f30eb61 *Add debug log to trac reason of a crash in Spell::DoAllEffectOnTarget.
--HG--
branch : trunk
2010-07-26 22:57:25 +02:00
click
33e079489b Set flag for offhand melee spells to allow proper triggering of weapon-specific effects (fix by Lynx3d)
--HG--
branch : trunk
2010-07-25 17:06:12 +02: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
QAston
2352fc7cdf *Add base scripting interfce for spells - thanks to Brian for help in making it compile with GCC.
*Add hook for handling spell effects in new scripting system.

--HG--
branch : trunk
2010-07-24 22:41:42 +02:00
QAston
13a2a1afc6 *Fix amount calculation for spell effect with EffectDieSides set to 0.
--HG--
branch : trunk
2010-07-22 12:21:11 +02:00
Shauren
6a539270ec Added global disable system and moved all disable fields/tables/configs into it
NOTE: instance disables were not converted for new system! if you had some then you need to fix that using new system

--HG--
branch : trunk
2010-07-21 12:14:23 +02:00
QAston
dd89c54c6e *Move target handling of TARGET_DEST_CASTER_FRONT_LEAP out of SPELL_EFFECT_LEAP handler, this fixes spells with SPELL_EFFECT_LEAP using other target types.
--HG--
branch : trunk
2010-07-21 02:06:51 +02:00
thenecromancer
c9860e3b9f Some spells with special proc state, some talents like it
--HG--
branch : trunk
2010-07-21 01:15:27 +02:00
QAston
c0f9ef6059 *Implement SPELL_EFFECT_CREATE_TAMED_PET(153).
--HG--
branch : trunk
2010-07-20 22:55:28 +02:00
QAston
f906976837 *Remove assertion from packet handler. Assertions should not be put in such places because we can't trust clients nor network.
*Do not allow to charm mounted units.

--HG--
branch : trunk
2010-07-20 01:42:14 +02:00
QAston
7eaaa06375 *Rename SPELL_EFFECT_JUMP2 to SPELL_EFFECT_JUMP_DEST, split the handler of effect from SPELL_EFFECT_JUMP handler
--HG--
branch : trunk
2010-07-19 21:24:09 +02:00
QAston
b406321c01 *Prevent possible problems with application of negative auras with 0 duration, now only spell hits which were diminished are immuned.
*Remove old code of SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE forgotten in c84e55b632.

--HG--
branch : trunk
2010-07-16 14:23:03 +02:00
QAston
719f13874e *Rename SPELL_AURA_RANGED_AP_ATTACKER_CREATURES_BONUS to SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE, and reimplement that aura type.
*Some more research about new aura types.

--HG--
branch : trunk
2010-07-16 13:20:50 +02:00
QAston
0252202504 *Correctly set basepoints of Learn spells - patch by Toni.Shocker.
*Make sure that Spell::m_currentBasePoints are used correctly in any other place of the code.

--HG--
branch : trunk
2010-07-15 23:20:41 +02:00
QAston
a43ec3f158 *Add SpellMgr::CalculateSpellEffectAmount function for consistency of effect amount calculations in core
*Remove SpellEntry::CalculateSimpleValue function and use the new cuntion instead
*Remove some workarounds made because of incorrect effect amount calculations
*Since now aura effect amount problems should be gone.

--HG--
branch : trunk
2010-07-14 16:57:13 +02:00
click
673c652ba6 change "IN_MILISECONDS" to proper english "IN_MILLISECONDS"
--HG--
branch : trunk
2010-07-12 00:30:17 +02:00
Shauren
456c6291ab Move trade data to dynamic structure and added support for applying enchant after trade ends, based on Vladimir's commits
--HG--
branch : trunk
2010-06-25 13:15:51 +02:00
Machiavelli
0f7657b68c Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern.

--HG--
branch : trunk
2010-06-25 00:18:01 +02:00
Xanadu
1218b001ac Fixed priest and druid AoE spells broken two commits back. Closes issue 2737.
--HG--
branch : trunk
2010-06-18 17:21:39 +02:00
Xanadu
9cd4e4289c In arenas Replenishment should only affect the caster.
--HG--
branch : trunk
2010-06-18 16:21:23 +02:00
Xanadu
c2cdc9994e Reviewed and fixed smart heal and energize target selection:
* Implemented Divine Hymn and Hymn of Hope targeting. Closes issue #180. Closes issue #2538.
* Fixed CoH healing any monsters in your target.
* Removed obsolete hackfix of Wild Growth that attempted the above.
* Fixed Glyph of Holy Light target selection that had code in a wrong place.
* Removed too general check that gave smart targeting to spells that shouldn't have it.
* Implemented correct number of targets for Althor's Abacus heal proc.

--HG--
branch : trunk
2010-06-18 04:17:21 +02:00
Shauren
9b2d3b0a71 Fixed typo
--HG--
branch : trunk
2010-06-16 19:58:40 +02:00
Shauren
3be48fe4fc Fixed old no-fly zone code to use area flags instead of hardcoded area ids (this fixes flying in Wintergrasp)
This does NOT implement no-fly zones!

--HG--
branch : trunk
2010-06-16 19:36:50 +02:00
Brian
bc04d7ce25 * Remove the last of the realative paths from #include statements
--HG--
branch : trunk
2010-06-08 17:01:03 -06:00
Rat
75b80d9f5b rearranged core files
--HG--
branch : trunk
2010-06-05 23:40:08 +02:00