Commit graph

2622 commits

Author SHA1 Message Date
balrok
d249e9550a changed battleground code for every bg
BattleGroundWS: changed warsong code for db-move

BattleGroundAB: changed arathi basin code for db-move

BattleGroundEY: changed eye of the storm code for db move

also some cleanup like:
renaming POINTS_MAX to NODES_MAX
renamed "m_" -> should only be used for classmember

BattleGroundAA: changed arena code for db move
2009-09-28 16:41:45 +02:00
balrok
c77683afbb event-handling functions in battleground-class
i added a map m_ActiveEvents which will track all current active events
it's allways key:event1 -> value:event2 so it's like a one dimensional array
which contains current active event2..
i only need one event2 in this list, cause i only want to allow one event2 at
the same time if other event2 are also active right now - i would just despawn
it

(for example (numbers not real) arathi basin stables are event1=3 and have 5
states (alliance assault, horde assault, neutral...) so every state has an
event2 index and only one state at a time is possible (so if we spawn
horde-contested gameobjects/creatures, we will despawn everything else)

OnObjectDBLoad - generic implementation for this function:
    will automaticly spawn or not spawn.. open (doors) or not open
    gameobjects/creatures

doors:
i use event1=254 and event2=0

IsDoor(event1,event2) - just a check if this event could be a door (mostly not
    needed for bg-subclasses)

OpenDoorEvent(event1,event2) - opens the door (used in bg subclass cause some
doors also must be despawned)

SpawnEvent(event1, event2, bool spawn)
    spawn=true says all related gameobjects/creatures getting spawned, else despawned
    will despawn all event2 in event1 which are not equal to the
    event2-parameter
    also this function will set the right values in m_ActiveEvents

IsActiveEvent(event1,event2) - returns true if event is active
2009-09-28 16:41:33 +02:00
balrok
538c5c257e [8548] implement db supported battleground eventindexes
those eventindexes will then be used by the battleground-code to decide
which creature belongs to which objective
for example all creatures in alteracvalley which are standing around a tower
will belong to one eventindex then.. the eventindex will be defined through the code
and must be proper documented for db-devs
2009-09-28 16:41:00 +02:00
balrok
3cf92b8507 spawnbgobject now accepts guids instead of bg_objects-index
this makes those functions independent from the bg_objects vector

also dooropen and doorclose will now accept only guid

additional i removed the comments around spawnbgcreatures-function
also i updated this function, so that it'll work
2009-09-28 16:15:25 +02:00
balrok
bd87209498 call OnObjectDBLoad(Creature/GameObject) for battleground at object-loading
this is a virtual function and can be used to move gameobjects
and creatures from battlegroundcode to database

for this i also had to add a BattleGround-pointer to the map
so i renamed CreateBattleGround(instanceid) to CreateBattleGroundMap(instanceid, Battleground*)
2009-09-28 16:15:01 +02:00
balrok
1665077dc4 [8547] implemented scriptcall: CorpseRemoved(uint32 & /*respawnDelay*/)
it will be called when the corpse of the scripted creature
get's removed,
it's possible to adjust the next respawn inside the script
2009-09-28 16:14:54 +02:00
balrok
0208c54bc9 [8546] implement battleground bonusweekends call to arms 2009-09-28 16:14:35 +02:00
balrok
b30fed45de typo in auctionmgr 2009-09-28 16:14:13 +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
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
ApoC
eb46131715 [8540] Revert "[8538] Fixed spell 63375" due to patch incorrectness.
Revert suggested by Vladimir.

This reverts commit 6217b913c35563f68ea3c414367cd7ac84236b3e.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-25 23:08:51 +02:00
Astellar
a84f2cba63 [8539] Check pet aura range at area aura update
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 23:21:30 +03:00
KAPATEJIb
04e7a553c2 [8538] Fixed spell 63375
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 20:43:27 +03:00
Shendor
f8047e9da0 [8537] Implement SPELL_AURA_MOD_CRIT_CHANCE for spell 31858
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 20:19:07 +03:00
zergtmn
19e28af2f0 [8536] Fixed spell 62776
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 20:05:06 +03:00
SilverIce
b72fe466e1 [8535] Correctly show spell sharges/stack amount
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 19:56:53 +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
NoFantasy
38aac1a77a [8533] Not remove timed quest and correctly fail when time runs out.
Add function to remove timed quest instead of direct access to set.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-09-25 16:02:53 +02:00
Antonio593
1bf0678ebd [8532] Fixed situation where some items like 42947 were not giving spell power bonus
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 15:54:17 +03:00
Shendor
49c97633b8 [8531] Fixed spell 20594
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 15:36:54 +03:00
Maxxie
a2d1781ba8 [8530] Correctly restore powers with energize-effect spells like Shadowfiend or Mana Tide Totem
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 15:12:18 +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
Ambal
284adafbeb [8526] Added upper limit for cell search radius, affect max visibility and AOE spell range. Set to 333 yards.
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-22 00:23:49 +03:00
Shendor
9a7708491f [8525] Implement glyph 45775
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-22 01:17:19 +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
Lutik
81456dc416 [8524] Add another versions of spell 44055 support.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-21 23:19:02 +03:00
Lutik
e0bf5e5656 [8523] Add another versions of spell 44055 support.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-21 23:33:30 +04:00
Shendor
952a17efba [8522] Implement pet talent 53478.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-21 22:50:45 +04:00
Win32
7768d5f3e7 [8521] Implement glyph 42744
Patch added with improvement in code suggested by Shendor.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-21 17:25:43 +04:00
Shendor
4254580141 [8520] Limit telent 49182 and ranks triggering expected:wq runes cooldown case.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-21 15:23:17 +04:00
VladimirMangos
1c59403b39 [8519] Use RuneType enum where appropriate and more explicit data for rune init. 2009-09-21 12:13:21 +04:00
KAPATEJIb
e4ed2ce29c [8518] Implement glyph 42745
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-21 02:11:52 +04:00
VladimirMangos
9b57017256 [8517] Implement glyph 42747. 2009-09-21 01:17:59 +04:00
NeatElves
53fb04dc14 [8517] Add support for one from quest wild summon types.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-21 00:18:16 +04:00
Shendor
b1cb25e92f [8516] Implement spell 53271.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-20 23:59:01 +04:00
crackm
305dddd7bd [8515] Add support for some quest critter summons.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-20 21:32:20 +04:00
Ambient5
64e753f169 [8514] Impmlement unleashing effect for possitive seals that not have special stored spell id for this.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-20 20:26:41 +04:00
crackm
7c6f770d64 [8513] One from wild summons type support.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-20 18:09:06 +04:00
Trazom
a7c7de947f [8512] Implement glyph 42408.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-19 21:36:09 +04:00
Maxxie
81a4eabe34 [8511] Limit talent 57472 triggering to only spell spell 17 and ranks as expected.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-19 19:17:18 +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
nos4r2zod
c361b0dc0b [8509] Some absorb shield aura fixes for specific spells.
* Apply expected healing bonus to spell 53601.
* Allow stacking spell 62600 and 22842 effects at caster.
* Update charges for absorb shield with charges and preopertly expire it at last charge.
  This fix spell 62600 effect remove at next damage.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-19 16:10:10 +04:00
NoFantasy
c5684fa7ab [8508] Not assign boolean value to integer variable, expecting to always be 0.
Also renaming member variables.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-09-19 11:57:57 +02:00