[11851] Implement spell effects for Kalecgos

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Xfurry 2011-11-28 22:14:02 +01:00 committed by Schmoozerd
parent f9a259dc44
commit 83e85416f4
7 changed files with 60 additions and 4 deletions

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0',
`required_11831_02_mangos_command` bit(1) default NULL
`required_11851_01_mangos_string` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@ -3845,6 +3845,7 @@ INSERT INTO `mangos_string` VALUES
(813,'Veteran',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(814,'Member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(815,'Initiate',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(816,'Your body is too exhausted to travel to the Spectral Realm.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1000,'Exiting daemon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1001,'Account deleted: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1002,'Account %s NOT deleted (probably sql file format was updated)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),

View file

@ -0,0 +1,5 @@
ALTER TABLE db_version CHANGE COLUMN required_11831_02_mangos_command required_11851_01_mangos_string bit;
DELETE FROM mangos_string WHERE entry=816;
INSERT INTO mangos_string VALUES
(816,'Your body is too exhausted to travel to the Spectral Realm.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

View file

@ -809,7 +809,8 @@ enum MangosStrings
LANG_GUILD_VETERAN = 813,
LANG_GUILD_MEMBER = 814,
LANG_GUILD_INITIATE = 815,
// Room for in-game strings 816-999 not used
LANG_FAIL_ENTER_SPECTRAL_REALM = 816,
// Room for in-game strings 817-999 not used
// Level 4 (CLI only commands)
LANG_COMMAND_EXIT = 1000,

View file

@ -1570,6 +1570,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
case 31347: // Doom TODO: exclude top threat target from target selection
case 33711: // Murmur's Touch
case 38794: // Murmur's Touch (h)
case 44869: // Spectral Blast
case 45976: // Open Portal
case 50988: // Glare of the Tribunal (Halls of Stone)
case 59870: // Glare of the Tribunal (h) (Halls of Stone)

View file

@ -1491,6 +1491,36 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastSpell(unitTarget, 44455, true, m_CastItem);
return;
}
case 44845: // Spectral Realm
{
if (!unitTarget)
return;
// teleport all targets which have the spectral realm aura
if (unitTarget->HasAura(46021))
{
unitTarget->RemoveAurasDueToSpell(46021);
unitTarget->CastSpell(unitTarget, 46020, true);
unitTarget->CastSpell(unitTarget, 44867, true);
}
return;
}
case 44869: // Spectral Blast
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
// If target has spectral exhaustion or spectral realm aura return
if (unitTarget->HasAura(44867) || unitTarget->HasAura(46021))
return;
// Cast the spectral realm effect spell, visual spell and spectral blast rift summoning
unitTarget->CastSpell(unitTarget, 44866, true, NULL, NULL, m_caster->GetObjectGuid());
unitTarget->CastSpell(unitTarget, 46648, true, NULL, NULL, m_caster->GetObjectGuid());
unitTarget->CastSpell(unitTarget, 44811, true);
return;
}
case 44875: // Complete Raptor Capture
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
@ -6711,6 +6741,24 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 44870, true);
break;
}
case 44811: // Spectral Realm
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
// If the player can't be teleported, send him a notification
if (unitTarget->HasAura(44867))
{
((Player*)unitTarget)->GetSession()->SendNotification(LANG_FAIL_ENTER_SPECTRAL_REALM);
return;
}
// Teleport target to the spectral realm, add debuff and force faction
unitTarget->CastSpell(unitTarget, 44852, true);
unitTarget->CastSpell(unitTarget, 46019, true);
unitTarget->CastSpell(unitTarget, 46021, true);
return;
}
case 45141: // Burn
{
if (!unitTarget)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11850"
#define REVISION_NR "11851"
#endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_11785_02_characters_instance"
#define REVISION_DB_MANGOS "required_11831_02_mangos_command"
#define REVISION_DB_MANGOS "required_11851_01_mangos_string"
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
#endif // __REVISION_SQL_H__