Commit Graph

61 Commits

Author SHA1 Message Date
Spp a136403dee Core: Remove "suggest parentheses around ‘&&’ within ‘||’" and "suggest parentheses around assignment used as truth value" warnings
--HG--
branch : trunk
2010-08-21 21:54:41 +02:00
Spp c15c605a11 Core: Remove "unused variable 'xxx'" warnings
--HG--
branch : trunk
2010-08-21 21:14:35 +02:00
Spp e7856a831c Core: Remove "enumeration value 'xxx' not handled in switch" warnings
--HG--
branch : trunk
2010-08-21 20:55:31 +02:00
QAston 77bd968c63 *Remove some unused containers from Spell class.
--HG--
branch : trunk
2010-08-21 21:00:06 +02:00
Spp c3343638cb Core: Remove lots warnings:
- All "'xxx' will be initialized after 'yyy' when initialized here"
- Some "unused variable"
- Some "enumeration value 'xxx' not handled in switch"

--HG--
branch : trunk
2010-08-21 20:08:47 +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
QAston 30bcf8c659 Scripts/Spell: extend SpellScript class: add target aura accessors and functions which prevent various effects of the spell from being executed. Check out SpellScript.h for details
--HG--
branch : trunk
2010-08-19 14:31:31 +02:00
azazel d4605c5f7f Fix (in theory) bug (already tapped error) for spells with banish mechanics (Banish, Cyclone).
Closes issue #1945.
Closes issue #2402.

--HG--
branch : trunk
2010-08-19 16:20:06 +06:00
QAston 5e78e222c1 Core/Spells: Implement TARGET_DEST_CHANNEL_CASTER(106) and TARGET_GAMEOBJECT_AREA_PATH(108). Rename TARGET_UNIT_CHANNEL to TARGET_UNIT_CHANNEL_TARGET, TARGET_DEST_CHANNEL to TARGET_DEST_CHANNEL_TARGET
--HG--
branch : trunk
2010-08-18 15:04:00 +02:00
QAston 0284ed4cfe *Core/Spells: Implement TARGET_UNIT_SUMMONER
*Rename TARGET_UNIT_MINIPET to TARGET_UNIT_TARGET_PUPPET.

--HG--
branch : trunk
2010-08-17 20:19:06 +02:00
click 3d48c480ce Fix: append a .c_str() on a variable in Spell.cpp (no more grumpy compilers) - Thanks to StormByte for the heads up
Fixes issue 3343

--HG--
branch : trunk
2010-08-09 20:20:55 +02:00
QAston fa8a826656 *(More) correct implementation of SPELL_EFFECT_PULL_TOWARDS_DEST(145)
--HG--
branch : trunk
2010-08-09 02:31:42 +02:00
QAston 617a56ba29 *Implement spell casting on transports (no more out of range error, etc)
*Add MO transports to ObjectAccessor storage
*Add functions Position::RelocateOffset and Position::GetPositionOffsetTo to help offset manipulations - BIG thanks to azazelkon for creating formulas!
*Add function to output debug info for MovementInfo and SpellCastTargets
*Throw ByteBufferException on incorrect packGUID read
*Add rfinish function to finish bytebuffer read.

--HG--
branch : trunk
2010-08-08 20:32:14 +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
XTZGZoReX 9083271a2f * Some singleton renames for consistency:
accmgr -> AccountMgr
objmgr -> ObjectMgr
auctionmgr -> sAuctionMgr
spellmgr -> sSpellMgr
CreatureEAI_Mgr -> sEventAIMgr
achievementmgr -> sAchievementMgr
gameeventmgr -> sGameEventMgr
sInstanceSaveManager -> sInstanceSaveMgr
poolhandler -> sPoolMgr

--HG--
branch : trunk
2010-08-08 05:25:45 +02:00
XTZGZoReX 909e332579 * Rename: BattleGround -> Battleground.
--HG--
branch : trunk
2010-08-08 04:37:24 +02:00
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