Commit Graph

77 Commits

Author SHA1 Message Date
Spp
405f312918 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 15:25:15 +02:00
QAston
2d877bbbfd *Allow damage shield hits to miss.
*Send overkill on damage shield hit.
*Correct data order for execute log of power take effects.

--HG--
branch : trunk
2010-08-29 03:38:21 +02:00
Shocker
f89a27dc98 Make sure crafting spells with non-random loot are not allowed to be casted if inventory is full. Fixes issue #2791
--HG--
branch : trunk
2010-08-28 02:20:26 +03:00
QAston
5eb7e80fd5 *Send VICTIMSTATE_INTACT on melee attack miss.
*Rename VICTIMSTATE_NORMAL to VICTIMSTATE_HIT.
*Set default memory allocated in Spell::InitExecuteLogData to 32 bytes.

--HG--
branch : trunk
2010-08-27 23:12:52 +02:00
QAston
36640c263a *Consistent parameter names of spell effect handlers - use effIndex instead of i or eff_idx or variations of it.
--HG--
branch : trunk
2010-08-27 19:36:27 +02:00
Shauren
5fbc8f1de4 Scripts/Icecrown Citadel: Added hacky workaround for teleporting spells because their default target is not supported by current grid system
Scripts/Icecrown Citadel: Mark Gunship event as complete on Lady Deathwhisper's death (temporary, until transport system will fully allow scripting the event)

--HG--
branch : trunk
2010-08-27 18:11:21 +02:00
QAston
f1d4933dcb *Fix combat logging of many spell effects - thanks to kiper, Ssp, Cyrax, and manuel for providing data and to Zor for inspecting opcodes.
--HG--
branch : trunk
2010-08-27 17:49:32 +02:00
QAston
c1ac063ba1 *Remove m_currentBasePoints from spell class, use m_spellValue instead.
--HG--
branch : trunk
2010-08-27 06:40:23 +02:00
QAston
1d3deae555 *Send to client periodic heal absorbtion.
*Heal over time spells are updating healing achievement progress now.

--HG--
branch : trunk
2010-08-27 01:13:27 +02:00
QAston
30d31ca40a *Fix usage of EffectValueMultiplier in spell code.
*Remove some obsolete code from spell class.
*Rename some spellmod and dbc column names to be more accurate.

--HG--
branch : trunk
2010-08-26 19:07:55 +02:00
Shauren
73d3f210a9 Scripts/Icecrown Citadel: Add script for Deathbringer Saurfang (only missing alliance outro due to need of spawning and moving a transport)
Scripts/Icecrown Citadel: Corrected Lord Marrowgar, should no longer target tanks with Bone Spike Graveyard, his Coldflame should now spread properly
Core/Scripts: Moved Lady Deathwhisper Mana Barrier handler to scripts
Core/Scripts: Allow AuraScript to prevent default effects by effect index
Core/Scripts: Added Is25ManRaid() method to ScriptedAI, obviously used to check if raid is 25man
Core/Achievements: Pass m_caster to UpdateAchievementCriteria for ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET

--HG--
branch : trunk
2010-08-21 20:50:38 +02:00
azazel
5fa14f58dc Core/Cleanup:
* move repeating code into separate method for storing locale strings in ObjectMgr (copy/paste sucks, you know)
* fix 'signed/unsigned' warnings (at least in VS)
* fix some other warnings and cleanup relative code

--HG--
branch : trunk
2010-08-26 15:54:56 +06:00
azazel
341e6303ef Core:
* add helping methods for manipulating unit's health and use it where applicable
* fix some conversion warnings and cleanup code (formatting, CRLF, tabs to spaces)

--HG--
branch : trunk
2010-08-26 01:20:57 +06: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
silinoron
5cbae843d5 Core/Game: fix all warnings related to converting doubles and floats.
--HG--
branch : trunk
2010-08-22 12:39:39 -07:00
click
670964803f Core: Fix more warnings, add new function sLog.outStaticDebug() that replaces DEBUG_LOG
--HG--
branch : trunk
2010-08-22 01:57:04 +02:00
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