Commit graph

327 commits

Author SHA1 Message Date
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
VladimirMangos
34dab079c4 [8784] Use more appropriate error for cast fail on taxi flight. 2009-11-08 03:42:36 +03:00
VladimirMangos
a4e3b3e6aa [8743] Fix cooldowns for passive spells
Passive spell cooldowns only for client show.
It sets by  non passive spells with same category
triggered from passive spell auras or in code explictly.

* Ignore cooldown at cast passive spells
* Not set coldowns at passive spell cast itself.
2009-10-27 09:29:01 +03:00
VladimirMangos
d7ae5e3af0 [8718] Remove most GetObjectInWorld functions and move some map local to Map
Also mape pet guid counter per-map (in different expecte to be global pet number)
2009-10-24 01:16:40 +04:00
ApoC
40b0a2cd92 [8717] Fixed SPELL_EFFECT_TAMECREATURE broken after [8686]
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-23 22:31:16 +02:00
balrok
ac6e13d0e3 [8691] fix battleground spiritguides
they are now alive and so some spellchecks got invalid
2009-10-20 23:37:47 +02:00
ApoC
58139610eb [8687] Fixes in TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT.
* Removed my too script check on data load.
* Allow looking up fo DB target also if spell has required focus set.
* Makes DB targets optional not required.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-20 23:21:44 +02:00
balrok
a2ff999fd3 [8676] implemented dead-visible creature flags_extra
with this flag you can specify a creature to be only
visible for dead players - this removes all hacks from
spiritguides/spirithealers from code and allows some other
special creatures

i decided to not implement an extra deathstate cause
actualy those creatures are almost equal to living ones
2009-10-18 21:28:36 +02:00
ApoC
ef2992f175 [8673] Typo fix from prev. commit. :(
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-18 19:57:38 +02:00
ApoC
3558829283 [8672] Fixed condition in prev. commit.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-18 19:33:04 +02:00
XTZGZoReX
0e1854a936 [8671] Correctly send SMSG_PET_TAME_FAILED with appropriate value when taming fail instead of spell fail.
I also removed conditions from Spell::EffectTameCreature which are checked in Spell::CheckCast.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-18 19:16:48 +02:00
VladimirMangos
b258a17ba4 [8658] Threat calculation fixes and improvements.
* Add single arg version Unit::AddThreat for just adding to threat list.
* Req. provide schollmask and crit flag for any real threat value for proper threats mod apply.
* Send crit flag in DealDamage as MELEE_HIT_CRIT for spell damage for later send to threat call.
* For not affected by modifiers threat values use SPELL_SCHOOL_MASK_NONE.
* Implement aura SPELL_AURA_MOD_CRITICAL_THREAT (used only in itemset 529 effect).
2009-10-17 11:02:30 +04:00
VladimirMangos
a4d61a6988 [8649] Implement SPELL_AURA_MECHANIC_IMMUNITY_MASK (147) and related cleanups.
* Always use machanic masks in form (1 << (mech-1)), fix all cases.
* Imppement SPELL_AURA_MECHANIC_IMMUNITY_MASK (mostly boss/elite spells).

Note: db stored mechannic masks already stored in proper format so not affected.
2009-10-15 20:53:01 +04:00
NoFantasy
65965bc5fa [8642] Replace the Spanish word 'hostil' with the English one.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-10-14 12:46:10 +02:00
ApoC
901eea0813 [8636] Fixed patch intoduced in [8544]. Now targeting should work as main idea of patch intended.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-14 02:38:38 +02:00
pasdVn
c47cf7bd61 [8635] Rewrote bonus damage claculation
* calculation depends on the damageClass now
  ->SPELL_DAMAGE_CLASS_RANGED & SPELL_DAMAGE_CLASS_MELEE use MeleeDamageBonus()
  ->SPELL_DAMAGE_CLASS_MAGIC & SPELL_DAMAGE_CLASS_RANGED use SpellDamageBonus()
* changes/improvements in MeleeDamageBonus:
  -> improved criterions to apply bonuses
  -> implemented scaling of FLAT damage Bonus for non weapon damage based spells
  -> support of DOT's
  -> added pet's bonus damage for non weapon based spells
* general cleanup in CalculateSpellDamage() and MeleeDamageBonus()
* implemented global helper functions GetWeaponAttackType() and GetAuraTicks() in SpellMgr

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-14 00:33:24 +02:00
VladimirMangos
f591211538 [8606] Restore seelction point around dest coordinates for TARGET_RANDOM_NEARBY_DEST
Thanks to qsa for pointing to problem.
2009-10-09 13:08:33 +04:00
tomrus88
2964f399c7 Merge commit 'origin/master' into 320 2009-10-03 11:04:30 +04:00
VladimirMangos
9919d89907 Fixed some commented cases for later apply in 3.2.x
* Allow cast 879 and ranks to players
* Add support for spell 67596 from some items added into 3.2.x
2009-10-03 07:22:46 +04:00
VladimirMangos
e167a567d5 [8583] Prevent crash at casting DK spells by non-DK characters. 2009-10-02 21:55:53 +04:00
VladimirMangos
59befa2e0e Merge branch 'master' into 320 2009-10-02 19:09:06 +04:00
hunuza
cedc62bd40 [8578] Fix targeting of priest spell 64843.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-10-01 20:32:47 +02:00
balrok
9204ed5eb5 [8569] replace ^ by != introduced in 8552
for clarification, also ^ could create unexpeced
results if our boolean TRUE is not equal to 1

thx to vladimir for pointing it out + explanation
2009-09-30 14:37:39 +02:00
Ambal
09c50ab921 [8568] Use more correct spell target coordinates calculation for implicit target types 72, 73, 86
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-30 14:57:12 +03:00
qsa
8cda413ddc [8556] Implement implicit target 36. Qsa is on rampage today, somebody stop him! :)
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-28 19:04:34 +03:00
tomrus88
546f7a7fe5 Merge commit 'origin/master' into 320
Conflicts:
	src/game/BattleGround.cpp
2009-09-28 19:52:54 +04:00
balrok
2da82a8c68 [8552] implemented spells which can be casted while dead
i added a function IsDeathOnlySpell() which returns true
if this spell can ONLY be casted while dead, so i haven't
implemented all spells which could be cast while dead..
2009-09-28 16:44:49 +02:00
balrok
5385b385bc [8551] code cleanup
moved arena/battleground check from spell::checkcast
to SpellMgr::GetSpellAllowedInLocationError

also i adjusted some spell_fail-codes related to battleground
cause a spell_fail_wrong_area always requires the areaid, else it
would output "not in area %s"

then we don't need to check for map->isarena() when player is already in an
arena

----
in Spell.h
i moved "isTargetableForAttack()" to the top - cause it was anyway used
in every case of that switch

and isTargetableForAttack for attack also checks for isAlive
and isInFlight

so this could get simplified
2009-09-28 16:44:37 +02:00
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