Commit graph

498 commits

Author SHA1 Message Date
KAPATEJIb
3a5f6ff0fb [9505] Removed facing limitation for spell 2764.
Signed-off-by: ApoC <apoc@nymfe.net>
2010-03-02 23:47:21 +01:00
VladimirMangos
c71f79584d [9501] Implement item limit category inventory mode.
* Now expected item limit categories (for example for item 5513 and related)
  correctly limited by its amount in inventory.
* Provide and use additional arg in SendEquipError for alt. way get affected
  item prototype. This let send to function item id and prevent crash client at
  limit category equip errors that required item prototype data.
2010-03-02 14:10:38 +03:00
VladimirMangos
4a051e2443 [9496] HomeBind fixes.
* Use area id instead zone id for home bind zone info as expected.
  This will for example proper show capital name in area himebinding for capital; tavern.
* Clarify that player create zone in fact is area (subzone)
* Implement SPELL_EFFECT_BIND for normal homebinding.
  Also support spell target position mode used in 53823/53821 spells
* Add Spell::EffectEmpty for mark spell effects that used but not expect any code in handler.
  Example weapon spells that used just as known spell markers for client.

Original patch idea inspirit by Sadikum patch suggestion.
2010-03-01 13:08:52 +03:00
VladimirMangos
7ecd5365b9 [9492] Some cleanup in effects table. 2010-03-01 06:43:02 +03:00
VladimirMangos
ded1e3c263 [9475] Add and use TotemSlot enum type 2010-02-28 07:31:25 +03:00
VladimirMangos
7e2d7d8324 [9474] Implement negative totem effect apply for 30706 and ranks. 2010-02-28 03:58:35 +03:00
ApoC
9d6531ae6d [9446] Compile fix in MovementGenerator.cpp
Also added few newlines to end of files to satisfy GCC.

Signed-off-by: ApoC <apoc@nymfe.net>
2010-02-24 22:20:37 +01:00
VladimirMangos
84080aaf60 [9411] More SpellEffectIndex using in apropriate cases 2010-02-19 06:45:11 +03:00
VladimirMangos
11b84d27c2 [9409] Use SpellEffectIndex as arg type for spell effect handlers. 2010-02-19 01:06:17 +03:00
VladimirMangos
ff8d494ed4 [9408] Add MAX_EFFECT_INDEX to enum SpellEffectIndex and use it. 2010-02-18 23:33:16 +03:00
NoFantasy
7c555add76 [9403] Replace number with enum name where explicitly used in array/other checks
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-02-17 19:07:00 +01:00
marintrica
500b91c049 [9394] Add expected spell ids to error output.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-15 21:53:50 +03:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
VladimirMangos
58d188f21a [9388] Implement max cast chain length for triggered spells.
* New config option MaxSpellCastsInChain ( 0 is disabled old way work )
* Check added for prevent stack overflow crashes in case infinity triggered casts sequences
  with more useful error output instead crash.
* Default config steeing in 10 casts expected to allow all possible in game proper cast chains.
2010-02-15 12:19:27 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
VladimirMangos
97cdb501a8 [9373] Fixed rune consume at no rune code mods
Do rune cost calculations only if no no rune cost mod active
2010-02-14 14:23:28 +03:00
laise
6fbe7f4307 [9363] Implement new way spell 1535 and ranks work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also implemented spell casting requirement check and proper animation.
2010-02-12 11:00:05 +03:00
VladimirMangos
003deed894 [9347] Restore wild gameobject casting.
Most visible case: gameobject based teleports.
2010-02-10 08:04:08 +03:00
VladimirMangos
96202d7dfd [9345] Show enchantment applied to item in trade slot to caster after apply.
Also more strictly check cases when in spell targets presetn item in trade slot.
2010-02-10 03:48:20 +03:00
AlexDereka
696cba9c37 [9330] Fixed msvc compile warnings. 2010-02-08 16:27:35 +03:00
AlexDereka
4338c9105d [9324] Fix some gcc warnings 2010-02-08 02:27:34 +03:00
VladimirMangos
2a01c79609 [9323] Fixes in code work with original caster guid.
* Add 2 function for 2 used way for original caster
  - GetAffectiveCaster(), is posible NULL unit as source spell affects
    (explcit caster, GO owner, caster of aura that trigering affect)..
  - GetCastingObject(), possible NULL world object as in game spell effects
    source, cast center, etc, need because original caster can store GO
    guid that apply effect around. In other cases m_caster
* Use functions and avoid use explicitly m_originalCaster
* Use GetAffectiveCaster() for fix explicit GO cast at near unit, like now fixed campfire bonus.
2010-02-08 00:53:03 +03:00
tomrus88
db547a008a Get rid of monster movement flags, since it's really spline flags.
Thanks to Ralek for research.
2010-02-07 15:03:36 +03:00
VladimirMangos
8ff7010750 [9285] Fixed unexpected double time for apply damage for spell 1464 and ranks.
* Implement way ignore some redundent data for triggered spells base at cast cost exist.
  Reason: some triggered spells inherited data from main spells
  just for porper client show spell attributes, we not need this data.
* Use check for ignore inherited cast time.
2010-02-02 20:17:04 +03:00
tomrus88
b85417df73 Movement packets cleanup. 2010-02-01 17:03:04 +03:00
tomrus88
41d8f1a5d4 Movement packets fix. 2010-02-01 00:43:18 +03:00
Valroft
ad7729479c [9280] Fixed work scrolls of enchantment.
SOme for its have spells with unexpected reagent requirements.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-01 00:19:17 +03:00
VladimirMangos
904995c024 [9274] Implement SPELL_EFFECT_SUMMON_ALL_TOTEMS
This implement work spells 66842, 66843, 66844.

Patch originall writed by Arthorius, with additional fixes from darkstalker
and hack removes from me.
2010-01-31 18:40:59 +03:00
laise
a1a0c6edbe [9269] Second attempt to add missing break for SPELL_EFFECT_SUMMON
(earlier accepted patch by daveh never pushed to master)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-30 14:42:17 +01:00
XTZGZoReX
0ff9250de2 [9245] Remove CellLock class and all cell-level thread locking.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
2010-01-23 21:36:15 +01:00
Laise
39b7636094 [9244] Implement talent Rime
And apply SPELLMOD_COST to rune spell cast as part this.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-23 20:19:13 +03:00
VladimirMangos
bf9cccfd5b [9243] Some spell rune code fixes
* Also replace check/take functions for runes by single 2 mode function
* Implement proper check for dead runes case
* Implement proper rune selection for Aura::HandleAuraConvertRune
2010-01-23 20:08:09 +03:00
lutik
cee525f9c8 [9230] Add maxtarget limits for spells 66013, 68509, 67700 and 68510
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-21 19:12:50 +01:00
VladimirMangos
6a2e8064f1 [9208] Big cleanup in UNIT_STAT_* use
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
  Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
  UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
  And UNIT_STAT_CONFUSED_MOVE for check real move in this state
2010-01-18 11:59:10 +03:00
Rockette
f02d897828 [9174] Target limit for spell 25991.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-14 13:06:43 +03:00
VladimirMangos
3b64d57b02 [9154] Implement spell 20375 targets amount depndence from triggering source spell. 2010-01-12 06:00:25 +03:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
Nihilus
337c2c584b [9114] Limit maxTargets for spell 28542 and 55665
Also add missing comment for target exclusion

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-06 20:12:32 +01:00
Forusim
9bc219a312 [9112] Limit maxTargets for spell 42005
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-05 02:38:57 +01:00
VladimirMangos
7496a6b91b [9102] Use FillRaidOrPartyHealthPriorityTargets for 34861 and ranks. 2010-01-02 19:20:06 +03:00
NoFantasy
1ec90288fb [9101] Correct target mode 48, and rename to something more meaningful
Also adjust target 49/50 angles to be really left/right.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-02 14:50:39 +01:00
wilibald09
b9fd5f4311 [9100] Set MaxTargets limit for spell 31347
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-01 21:41:53 +01:00
VladimirMangos
c09ee423ba [9098] More correct targets selection for target pairs with TARGET_SELF2
* Many spell effects that have A target mode SELF2 expected applied to enemy
  target selected by targetmode B so we need skip SELF2 target mode.
* remove SEFL2 from explicit positive target modes.
2010-01-01 21:18:43 +03:00
NetSky
2087aa2876 [9091] Add max targets limit for spell 34861 and ranks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also implement glyph 42396 work for referenced spells.
2009-12-31 19:18:38 +03:00
NetSky
9a6c248dec [9089] Check explicit target correctness by all effect target modes.
All effect target modes start from client provided target data
so all its must be used for checking explicit target modes.
For example exist spells that have as first effect SELF non-explicit target mode.
but in same time negative to explicit target.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also add caching IsHostileTo/IsFriendlyTo for avoid recall this not fast functions.
2009-12-31 15:32:00 +03:00
NoFantasy
468295392d [9086] Limit maxTargets for spell 33711 and 38794
Also remove not strict required difficulty check for some spells and add lost comment from [9085]

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 20:14:48 +01:00
NoFantasy
663f8df849 [9083] Rename maps naming used in spell targeting code for easier readability
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 13:13:33 +01:00
NoFantasy
70c8eb5906 [9082] Correct some spells unMaxTarget (ref [9080]) to depend on map difficulty
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 11:06:24 +01:00
NoFantasy
7bcf8f44aa [9080] Add custom/preset unMaxTargets for a few spells where info is not present
Thanks to kamillys and KAPATEJIb for original code and research!

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 02:00:25 +01:00
NoFantasy
46b6723af1 [9079] Less strict check related to TARGET_SCRIPT_COORDINATES
Fixes and enables ~20 more summon related spells. Some minor cleanup in related code

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-29 00:42:24 +01:00