Commit graph

2983 commits

Author SHA1 Message Date
balrok
1f9b4ca4c3 [8553] removed spiritguide from code
they basicaly should
*autocast 22011
*give player after gossiphello buff 2584
*port players away to another spiritguides, when they die

so this can be done by a script
and maybe eventai
2009-09-28 16:45:06 +02: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
balrok
9143f19bef [8550] call Unit::Update() also for spiritguides
cause they are dead i had to add another hack :-/
2009-09-28 16:44:25 +02:00
balrok
db7c9f4fc1 [8549] Eventloading check
Through the eventsystem can be quite complex and errormessages should
be quite meaningful for finding mistakes in sql
I decided to create another table in database
This table will just contain the map,event1,event2 and a human
readable description of every event
the primary key is over map,event1,event2

this table will be outer joined with bg_creatures,bg_gameobject
so every inner-join part will just match those events and create no error

but every outer join part will mean there was something wrong
(either a spawn which has no existant event, or an event where no spawn is
inside)

also this table is very useful for db-developers, to see which events exist
without looking into code and understanding the logic behind the code

also please note:
those error-checks don't (and can't) report every mistake..
for example if you have an arathibasin node - and add just one creature in this
event - this system won't look, if you've spawned all needed gameobjects and so
on..
an idea would be to add to this table how much gameobjects and creatures have to
be there at minimum - but i doubt that this will be much helpful
also i won't stop battlegrounds from loading if not all events do exist
(just cause i see no need in it)
2009-09-28 16:44:02 +02:00
balrok
0ce6395857 gm command for reload of eventindex
also i merged both loading functions together
(union-select gameobject and creature)
those loading functions were pretty similar
2009-09-28 16:42:08 +02:00
balrok
2adf6245c2 BattleGround: removed now unneeded functions
I couldn't remove AddObject and m_bgObjects from code
cause it's still needed for buffobjects.. later
the poolsystem must be rewritten, so that it'll work for instances too
then those objects can be removed

(it would be possible to take the eventsystem for those spawns too - but
this would be the wrong way to handle it)
2009-09-28 16:42:01 +02:00
balrok
9b7b3b0304 corrected spawning of buffobjects in arena
they are spawned in all arenas 60 seconds after start
so i implemented this function in BattleGround.cpp
maybe we should use BattleGroundAA for such things
then we also can drop all arena-files, cause
all arenas are working in the same way
(at least those which are currently implemented)
2009-09-28 16:41:54 +02:00
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
hunuza
23618d66ea Implement DK talent 49471 and ranks.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-27 22:21:11 +02: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
hunuza
6c12b38711 Implement DK spell 50842.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-27 17:32:28 +02: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
hunuza
302afbc40f Allow weapon procs in druid shapeshifts.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-27 12:24:34 +02: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
hunuza
1e0b93abdb You now only need 1600 resources to win in AB and EY.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-26 18:14:49 +02:00
tomrus88
f06741d7c4 Merge commit 'origin/master' into 320
Conflicts:
	src/game/SpellAuras.cpp
2009-09-26 19:51:04 +04:00
tomrus88
3f33946d6a Update to latest client build 10505.
Fixed CMSG_AUCTION_SELL_ITEM.
Fixed CMSG_BUY_PETITION.
Some other fixes.
2009-09-26 19:40:14 +04:00
tomrus88
f865cd7962 Some lost changes. 2009-09-26 19:24:11 +04:00
Ambal
e86f7d74ec [8528] Implementing implicit target 49, 50. Thanks to qsa.
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:24:10 +04:00
Ambal
0517d4ccdd [8527] Make Spell::FillAreaTargets() code use new cell search algorithm
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:23:50 +04: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
ApoC
e2556b1825 [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-26 19:21:52 +04:00
Astellar
88efd1f18a [8539] Check pet aura range at area aura update
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:21:51 +04:00
KAPATEJIb
8c276365ba [8538] Fixed spell 63375
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:21:50 +04:00
Shendor
18a20e1e9f [8537] Implement SPELL_AURA_MOD_CRIT_CHANCE for spell 31858
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:21:50 +04:00
zergtmn
76b0b9ace3 [8536] Fixed spell 62776
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:20:03 +04:00
SilverIce
44ea1ee3e3 [8535] Correctly show spell sharges/stack amount
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:20:02 +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
NoFantasy
94b0650693 [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-26 19:20:00 +04:00
Antonio593
e9c38b03f4 [8532] Fixed situation where some items like 42947 were not giving spell power bonus
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:59 +04:00
Shendor
249555f411 [8531] Fixed spell 20594
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:58 +04:00
Maxxie
3c89d50d10 [8530] Correctly restore powers with energize-effect spells like Shadowfiend or Mana Tide Totem
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:57 +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
Tequila
65aa5c89e1 Fix AP coefficient of 32645 and ranks.
In 3.2.2 it does an additional 0.09 damage per combo point and AP.

Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-26 16:56:20 +02:00
hunuza
88040431b5 Fix some death knight glyphs.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-26 13:24:50 +02: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