Commit graph

498 commits

Author SHA1 Message Date
qsa
41fec59cf9 Implement implicit target types 64, 66, 67
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-28 15:36:51 +03:00
qsa
fff2cae4b4 [8545] Implement implicit target type 54, TARGET_LARGE_FRONTAL_CONE
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-28 15:13:05 +03:00
qsa
f6f5b532cc [8544] Implement implicit target type 40, TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-28 14:58:12 +03:00
qsa
549556c7d0 [8543] Implement implicit target 60 (affects 82 spells)
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-27 22:01:09 +03:00
nos4r2zod
62cee4d29f [8542] Correct formulas for destinantion coords calculation for implicit target types 72, 73, 89
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-27 13:56:41 +03:00
qsa
a5ef1f9457 Implement implicit target type TARGET_RANDOM_NEARBY_LOC_LR.
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-27 10:04:36 +03:00
qsa
eee1553ab1 [8541] Implement implicit target types TARGET_RANDOM_NEARBY_LOC(72) and TARGET_RANDOM_NEARBY_DEST(86). Some summon spells should work fine now
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:21:53 +04:00
qsa
f168badca6 [8534] Add error output to track unhandled targetMode values in Spell::SetTargetMap()
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:20:01 +04:00
Shendor
249555f411 [8531] Fixed spell 20594
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:58 +04:00
Ambal
a202347079 [8529] check rune cost only if spell has PowerType == POWER_RUNE. Patch provided by yavi.
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:56 +04:00
Ambal
d482660177 [8528] Implementing implicit target 49, 50. Thanks to qsa.
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:55 +04:00
Ambal
63b5154ca1 [8527] Make Spell::FillAreaTargets() code use new cell search algorithm
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:54 +04:00
qsa
c78be3fc74 [8541] Implement implicit target types TARGET_RANDOM_NEARBY_LOC(72) and TARGET_RANDOM_NEARBY_DEST(86). Some summon spells should work fine now
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 09:29:44 +03:00
qsa
0c051485d9 [8534] Add error output to track unhandled targetMode values in Spell::SetTargetMap()
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 18:14:57 +03:00
Shendor
49c97633b8 [8531] Fixed spell 20594
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 15:36:54 +03:00
Ambal
d937b18dbe [8529] check rune cost only if spell has PowerType == POWER_RUNE. Patch provided by yavi.
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 14:28:58 +03:00
Ambal
b24e9de324 [8528] Implementing implicit target 49, 50. Thanks to qsa.
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 10:29:33 +03:00
Ambal
c71fc301ec [8527] Make Spell::FillAreaTargets() code use new cell search algorithm
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-23 22:26:30 +03:00
tomrus88
258e19a4a3 Merge commit 'origin/master' into 320 2009-09-22 18:14:06 +04:00
Ambal
cfea99ea62 [8524] New cell search algorithm implemented. You can now choose different visibility distances on continents, in BG/Arenas and instances.
Please, update your config files and check new options:

Visibility.Distance.Continents    = 90
Visibility.Distance.Instances     = 120
Visibility.Distance.BGArenas      = 180

Thanks everyone involved in patch tests!

Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-21 23:25:29 +03:00
VladimirMangos
1c59403b39 [8519] Use RuneType enum where appropriate and more explicit data for rune init. 2009-09-21 12:13:21 +04:00
pasdVn
b42082bc0c [8510] Fixes for healing crit calculation code
* Implement talent 63504 and ranks
* Allow work target dependent healing crit chance mods
  This let work existed code for talent 57470 and ranks

(cherry picked from commit eadc239846d6dc5db582908458421411995d7974)

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

Also
* Drop oudated functionality code for 47558 and ranks (new functionality code already added)
2009-09-19 18:28:44 +04:00
tomrus88
2d86aa4535 Misc fixes. 2009-09-14 18:11:15 +04:00
tomrus88
6f2b9a7e80 Merge commit 'origin/master' into 320 2009-09-14 16:32:59 +04:00
nos4r2zod
d91f2c2c35 [8487] Fixes in paladin seals and related spells.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-11 06:08:40 +04:00
tomrus88
b96e4bfed7 Merge commit 'origin/master' into 320 2009-09-10 16:07:26 +04:00
pasdVn
70df7c8e91 [8484] Fix priest spell 47585
* Move precast spell and add one more to Aura boosts for proper remove at cancel.
* Check in ispositivespell as positive to allow cancel in client.

(cherry picked from commit 6566ec2bbd3654921446b6522e9800ef835ffffe)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-10 07:31:51 +04:00
VladimirMangos
7974e1ebcb Merge branch 'master' into 320 2009-09-10 05:46:08 +04:00
ApoC
71e736abc6 [8478] Removed dependency on getMSTime() for last mana use.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-06 01:40:22 +02:00
Trazom
dffa5d43bd [8477] Implemented "on demand" regeneration of power in Spell::CheckPower (limited to 500ms frequency).
Correctly set UNIT_FLAG2_REGENERATE_POWER to notify client to stop/start regen in bar.
thx. also for nos4r2zod

From original patch was removed usage of getMSTime() and rewrited this part.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-06 01:39:13 +02:00
balrok
bd30769dec [8475] fixed some gcc-warnings
all warnings from Wunused
and some from Wall

cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code

for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint

also note for coding:
if you do something like
    if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)

Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-09-05 13:47:47 +02:00
VladimirMangos
b145659b31 [8468] Move TARGET_EFFECT_SELECT target selection to normal place for target modes.
* Make from TARGET_EFFECT_SELECT code normal Spell::SetTargetMap case
* In additional for old 0/TARGET_EFFECT_SELECT pairs call it in case coordinate targets.
2009-09-05 04:13:08 +04:00
tomrus88
fdc20af337 Some fixes. 2009-08-28 22:33:52 +04:00
VladimirMangos
5d50bb16b8 [8426] Use upper/lower iterator pairs as result instead 2 function calls. 2009-08-27 10:56:20 +04:00
VladimirMangos
45dd7140b5 [8422] Implement far sight like spells work for long distance.
* Added basic infrastructure for visibility update in case difference player and current view point.
  Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
  so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
  Without additional changes and not implemented (you will see empty area without creatures in likes case)

* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
2009-08-26 08:30:40 +04:00
VladimirMangos
9eb5a3eea1 [8394] Fixes for some non-self only positive spells.
* Propertly reject self targeting for pet spell 2947 and ranks, and spell 54646.
* Some related fixes for pet spells with target mode TARGET_SINGLE_FRIEND_2
* Implement original caster bonus part of spell 54646.
2009-08-20 00:26:34 +04:00
VladimirMangos
74d27294aa [8381] Some refactoring work in Unit::m_currentSpells code.
* Restrict access, use enum args, move some repeated code parts to function.
* Make m_selfContainer set only part of Unit::SetCurrentCastedSpell
2009-08-18 02:12:56 +04:00
VladimirMangos
acc922a11a [8362] Prevent apply low-level cast limitation at positive aura apply to self in hostile to target spell. 2009-08-13 19:22:48 +04:00
VladimirMangos
0bbc496192 [8357] Use less hacky Spell::AddTriggeredSpell call for spell 33076 and ranks jump animation cast 2009-08-12 17:49:37 +04:00
VladimirMangos
e01e1b4fb4 [8350] Implement (partly) 78-85 target modes.
Thanks to Astellar for original reseach related target modes.
2009-08-11 19:53:56 +04:00
VladimirMangos
cb29748467 [8349] Include offhand weapon part and aply proper dagger bonus for spell 51723. 2009-08-11 04:32:21 +04:00
VladimirMangos
99f74411a0 [8346] Avoid aggro at positive spells for non friendly targets.
* Not all positive spell have SPELL_ATTR_EX_NO_INITIAL_AGGRO (for react at assistance).
  Avoid aggro at positive spell without this flag for non frindly target.
* Some cleanups and better checks in IsPositiveEffect.
2009-08-11 01:24:37 +04:00
VladimirMangos
0449aadc74 [8322] Fixed work spells with ..NOT_BREAK_STEALTH and without ..NO_INITIAL_AGGRO
* Target don't must lost stealth at hit by NOT_BREAK_STEALTH spell also.
* Target don't must aggro at hit not NO_INITIAL_AGGRO spell
  if caster still not detected by aggro. This possoble in case when cast not remove
  stealth (spell have NOT_BREAK_STEALTH)
* This fixed spell 921 wrong lost stealth at success and possible some other spells.
2009-08-06 12:23:41 +04:00
VladimirMangos
dc8bf0f7e7 [8317] Implement 48801 and ranks work as expected in 3.1.x
Original patch writed by QAston.
Original patch prepared to mangos by KAPATEJIb.
2009-08-05 17:53:31 +04:00
VladimirMangos
3c47e6117a [8308] More generic code for new continent spell casting including fly form/mounts.
* Check new continent requirement by SPELL_ATTR_EX4_CAST_ONLY_IN_OUTLAND in
  SpellMgr::GetSpellAllowedInLocationError.
* Also in this function let ignore any area requirement in GM-mode (except client side checks ofc if use spellbook/item)
* For fly form/mount auras check only speciaal reqirement like special fly skill and ignore it for dead state.
* Drop explicit fly auras drop at zone update, now this part GetSpellAllowedInLocationError functionality.
* Allow in `spell_area` have data deepndent from ghost auras

This all allow implement apply spells 55173/55164 to player ghost wiht DB support in `spell_area`
2009-08-04 23:43:35 +04:00
VladimirMangos
19ccf59cd4 [8301] Restore work 1122 broken after switch.
Also small cleanup in summon code: move statue summon cal from EffectSummonGuardian
to common summon type selector code.
2009-08-03 16:05:31 +04:00
KAPATEJIb
cdf895d134 [8287] Allow caster targeting in target selection for 52759 and buf from 51556 and rabks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-01 19:15:06 +04:00
VladimirMangos
c7f8c9b52b Avoid target requirement checks for spells with caster base target selection (self,pet,around).
This fix cast fail for some spells, mostly triggered or scripted with unexpected prowided explicit tatrget different from caster.
2009-07-31 17:08:47 +04:00
Gendalph
ae61c1eec0 [8277] Add new line at the end of some .cpp to make gcc happy
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-29 18:34:37 +04:00
Lutik
48eb01666d [8264] Implement target mode 104 (forward 30 degries cone)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-28 14:14:05 +04:00