Commit Graph

149 Commits

Author SHA1 Message Date
Tartalo
63bfba39a8 Nexus, Nexus: Cleanup
--HG--
branch : trunk
2010-03-27 22:10:18 +01:00
Trazom62
d02f303b8d Implement Script CoS. Thanks Johnholiver.
Fixes issue #336.

Requires DB update.
Still WiP but functional.

--HG--
branch : trunk
2010-03-27 18:39:22 +01:00
Anubisss
ce8cc85dfa Make a function(ToTempSummon()) which can convert Creature to TempSummon with a C++ cast(reinterpret_cast) and with a type check(isSummon()).
This function is like ToPlayer(), ToTotem(), etc.

This commit is like ede831bdd6f0cff481acc33f269fa7f8c78befd4 / r7496:
http://code.google.com/p/trinitycore/source/detail?r=ede831bdd6f0cff481acc33f269fa7f8c78befd4
As a result, this commit has the advantages and the "disadvantages" too, like r7496.

Please try to be polite if this commit causes some crashes.

--HG--
branch : trunk
2010-03-27 16:08:14 +01:00
Machiavelli
769f54eedf Fix compiler warning in mob_crystal_handlerAI
--HG--
branch : trunk
2010-03-27 15:11:14 +01:00
Anubisss
be739e9900 Use GUIDs instead of "global" pointers in ~all boss/instance scripts.
GUIDs are most safer than pointers and in some cases can avoid segmentation faults.

== - ==

Let me show a simple example:

We have a pointer to a creature: Creature *pCreature;

and try to search a creature and store it in the pointer:
pCreature = SearchCreature(ID);

We can check simply if the creature found or not:
if(pCreature)
- if this give true: creature found and we have a memory address which points to the creature
- if this give false: creature not found and this is a NULL pointer

Suppose that we have a valid pointer, so creature found.
We wanna use that pointer somewhere, for example in script phase 3.
But we delete the creature(from world) in phase 1.
In phase 3:
if(pCreature)
    pCreature->DoSomeShit();
The if condition gives true, but pCreature points to an _invalid_ address.
In that address maybe have "nothing" or another creature's object or a player or anything else, dont know that.

~~ - ~~

Let me show the correct way:
Creature's GUID: uint64 CreatureGUID;

search the creature and set the GUID:
Creature *pCreature = SearchCreature(ID);
CreatureGUID = pCreature ? pCreature->GetGUID() : 0; // if pCreature is NULL set the GUID to 0

So we have a GUID and not a pointer.
We can get the creature from that GUID:
Creature *pCreature = GetCreature(CreatureGUID);
and we can simply check it is valid or not(found or not):
if(pCreature)

So we deleted the creature in phase 1 and try to use it in phase 3:
Creature *pCreature = GetCreature(CreatureGUID);
And this gives NULL because GetCreature() can't find the creature which GUID is CreatureGUID.

if(pCreature) // pCreature is NULL
    pCreature->DoSomeShit(); // DoSomeShit() not called

== - ==

Remove some not used variables.
Some clean.

TODO: Should search/fix these in zones scripts.

--HG--
branch : trunk
2010-03-27 13:54:38 +01:00
Trazom62
099ef2a9b6 Fix InstanceData::DoCompleteAchievement (and crash in AchievementMgr::CompletedAchievement).
Remove support of no longer existing achievement "The Party is Over". Thanks JuliuSZS.
Fixes issue #1318.

--HG--
branch : trunk
2010-03-27 13:45:39 +01:00
Trazom62
eedd43efa5 Fix UT/Ingvar the plunderer script.
Fixes issue #1034.

- Remove setDisplayID hack and use UpdateEntry to fix Ingvar Kill Credit related achievements.
- code style cleaning.

Requires DB update to set loot from Ingvar Human (23954) to Undead (23980) (in normal and heroic).

--HG--
branch : trunk
2010-03-27 13:14:13 +01:00
_manuel_
ecba58c8f6 Fix hardmode achievement from Obsidiam Sanctum
Fix Flame Tsunami aura and visual effects

Author: Gyullo

--HG--
branch : trunk
2010-03-26 23:16:22 -03:00
_manuel_
49c5be6d80 Improvement in npc_mageguard_dalaranAI.
--HG--
branch : trunk
2010-03-26 22:13:04 -03:00
Tartalo
7d6923d8c7 BlackRock Depths: Some improvements, by antihrists
Fix Tomb of Seven event
Fix Shadowforge braziers
GO handling for Magmus

--HG--
branch : trunk
2010-03-25 13:33:49 +01:00
Tartalo
080229fec3 Gundrak, Gal'Darah: Script improvements by pivonroll
Fix some Spell IDs & timers
Implement transformation

--HG--
branch : trunk
2010-03-25 10:32:07 +01:00
Tartalo
5a2e20b765 Gundrak: Cleanup
--HG--
branch : trunk
2010-03-25 02:49:41 +01:00
Tartalo
41ad4fffeb Drak'Tharon Keep, Novos the Summoner: some improvements by pivonroll
Fix resseting issues
Better IA for adds

--HG--
branch : trunk
2010-03-24 13:34:49 +01:00
Tartalo
80cb722bba Drak'Tharon Keep: Cleanup
--HG--
branch : trunk
2010-03-24 12:31:00 +01:00
Tartalo
90b19607a1 Merge
--HG--
branch : trunk
2010-03-24 00:21:59 +01:00
Tartalo
50c5d81a79 Merge
--HG--
branch : trunk
2010-03-24 00:21:31 +01:00
Tartalo
c7f5d95a1d Azjol Nerub, Azjol Nerub: Cleanup
--HG--
branch : trunk
2010-03-24 00:13:00 +01:00
Tartalo
29201cf687 Azjol Nerub, Ahn'Kahet: cleanup
--HG--
branch : trunk
2010-03-23 22:34:31 +01:00
Trazom62
76a8d8a62c Implement Tharon'ja achievements (Requires DB Data).
--HG--
branch : trunk
2010-03-23 21:31:30 +01:00
Trazom62
72c3c4696b Implement Tribunal of Ages Achievements (Requires DB Data)
--HG--
branch : trunk
2010-03-23 20:31:55 +01:00
Trazom62
1e9de7dbd7 Implement Four-Horsemen achievements (requires DB Data).
Fixes issue #1107.

--HG--
branch : trunk
2010-03-23 19:15:17 +01:00
Tartalo
a348b591a7 Violet Hold: Exploit fix
Now bosses reset if they're hitted when their door is closed

--HG--
branch : trunk
2010-03-23 12:48:28 +01:00
Tartalo
3cd729294e Gundrak: Fix for Eck the Ferocious spawning
--HG--
branch : trunk
2010-03-23 12:25:01 +01:00
Tartalo
2c2b75fb55 Ahn'Kahet: Code cleansing
--HG--
branch : trunk
2010-03-22 23:24:59 +01:00
Tartalo
2e5c5d3e1b Hall of Lightning: Fix Encounter state saving to db
Thanks Aokromes, Baraka & Spawn

--HG--
branch : trunk
2010-03-22 22:48:05 +01:00
Tartalo
c80b67cebd Nexus, Anomalus: Summons rifts only once. Blizzlike 3.3.2 update
--HG--
branch : trunk
2010-03-22 22:44:54 +01:00
Tartalo
0d1bd05ce7 Gundrak: Code cleansing
--HG--
branch : trunk
2010-03-22 22:36:26 +01:00
Tartalo
df45e38ba6 Gundrak: Implement Eck the Ferocious spawning
Based on pivonroll's code but rewrited from scratch

--HG--
branch : trunk
2010-03-22 22:27:37 +01:00
Trazom62
4478ccf6c4 Add script VoA/Koralon and Toravon. Thanks WarHead.
Fixes issue #1231.

--HG--
branch : trunk
2010-03-22 15:33:44 +01:00
Trazom62
248286c08d Fix Crash in XT-002 (Gravity Bomb proc). Fixes issue #734.
Fix compilation warning.
Fix typo in Freya soundid.

--HG--
branch : trunk
2010-03-22 14:07:08 +01:00
_manuel_
e34a7d3134 Merge
--HG--
branch : trunk
2010-03-21 15:22:40 -03:00
_manuel_
fae77f2621 Add additional field for storage of speed_run rate of creature
This allow independent rate of walk vs run speed. Existing field renamed to explicit speed_walk.

Note that default database rate for run is a result of the most common value seen, 8.0/7.0

Author: NoFantasy.

--HG--
branch : trunk
2010-03-21 14:57:49 -03:00
Tartalo
4a7b208eab Naxxramas, Noth the Plaguebringer: Adjust timers, by scarymovie87
Closes issue #172.

--HG--
branch : trunk
2010-03-21 18:44:28 +01:00
Tartalo
2c34b6d376 The Obsidiam Sanctum: Several updates, by Ouden
Portal event, Flame Tsunami, Twilight Eggs, Twilights Fissure, Achievements in Hard Mode
Closes issue #1015.

--HG--
branch : trunk
2010-03-21 18:32:50 +01:00
Trazom62
450b2fba9d Update Script Ulduar/XT-002. Thanks Dakeyras. Fixes issue 1074.
Add script texts for all ulduar bosses and adds. Mainly from wowwiki, Thanks.
Some code style cleanup.
Still WiP.

--HG--
branch : trunk
2010-03-21 17:17:34 +01:00
malcromdev@gmail.com>
c5f8341634 fixed oculus drake cpp and sql
--HG--
branch : trunk
2010-03-21 13:39:59 -02:30
Machiavelli
e26b96663a Small update to Onyxia script:
- Support for spawning Onyx Lair guardians
- Maximum Whelp count per wave set to 20 as per Blizzlike
- small update to her movement in phase 2 (might need to be overhauled, Breath isn't casted often enough)

--HG--
branch : trunk
2010-03-21 16:52:17 +01:00
Tartalo
36b2b5a1bc The Nexus, The Oculus: Boss drakos support, register needed scripts
This scripts are pushed for testing purposes, so is not recommended
opening it for production enviroments. any feedback is welcome :)
Fixes issue #449.

--HG--
branch : trunk
2010-03-21 15:28:37 +01:00
Tartalo
10417f1e6d Fix few typos on last commits
--HG--
branch : trunk
2010-03-20 13:22:02 +01:00
Tartalo
3ddaedf88c Gundrak, Slad'Ran: Despawn adds on wipe
--HG--
branch : trunk
2010-03-20 13:20:35 +01:00
Tartalo
830e55cfcb Azjol Nerub, Anub'Arak: Despawn adds on wipes
--HG--
branch : trunk
2010-03-20 13:18:48 +01:00
Tartalo
617c94c9da Halls of Stone: Implement achievement Brann's Spankin' New
--HG--
branch : trunk
2010-03-20 13:15:44 +01:00
Tartalo
5bd575b974 Halls of Stone: Allow to loot Brann's chest when encounter ends (without waiting all the event). Blizzlike change
--HG--
branch : trunk
2010-03-20 13:06:21 +01:00
Machiavelli
3ae5a4094e Implement instance script for Zul'Farrak and prevent Gahz'Rilla from being summoned multiple times.
--HG--
branch : trunk
2010-03-19 21:38:07 +01:00
Rat
ef57a96cce *fix quest Bury Those Cockroaches!(11608)
--HG--
branch : trunk
2010-03-18 22:34:14 +01:00
malcromtdb@gmail.com
bef85de621 Add script for Amberpine Woodsmen Grizzly Hills
--HG--
branch : trunk
2010-03-17 18:27:17 -02:30
Xanadu
5603de6048 Argent Tournament Post script by Malcrom
--HG--
branch : trunk
2010-03-17 21:20:21 +01:00
Anubisss
fe67a3bc6e Fix some possible crashes.
--HG--
branch : trunk
2010-03-16 23:46:20 +01:00
Trazom62
b00c745455 Update Halls of Stones script text entries to correct range.
Fixes issue #607.

--HG--
branch : trunk
2010-03-16 21:24:00 +01:00
Rat
c8fd37a9dc *small tweaks to Utgarde keep bosses
--HG--
branch : trunk
2010-03-14 23:44:27 +01:00