*Merge.
--HG-- branch : trunk rename : sql/updates/XXX_characters_auctionhouse.sql => sql/updates/1164_characters.sql
This commit is contained in:
@@ -0,0 +1,141 @@
|
|||||||
|
DROP TABLE IF EXISTS `access_requirement`;
|
||||||
|
CREATE TABLE `access_requirement` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL COMMENT 'Identifier',
|
||||||
|
`level_min` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`level_max` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`item` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`item2` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`heroic_key` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`heroic_key2` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`quest_done` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`quest_failed_text` TEXT NULL DEFAULT NULL,
|
||||||
|
`heroic_quest_done` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
`heroic_quest_failed_text` TEXT NULL DEFAULT NULL,
|
||||||
|
`comment` TEXT NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Access Requirements';
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `instance_template`
|
||||||
|
DROP COLUMN `levelMin`,
|
||||||
|
DROP COLUMN `levelMax`,
|
||||||
|
ADD COLUMN `access_id` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `reset_delay`;
|
||||||
|
|
||||||
|
ALTER TABLE `areatrigger_teleport`
|
||||||
|
DROP COLUMN `required_level`,
|
||||||
|
DROP COLUMN `required_item`,
|
||||||
|
DROP COLUMN `required_item2`,
|
||||||
|
DROP COLUMN `heroic_key`,
|
||||||
|
DROP COLUMN `heroic_key2`,
|
||||||
|
DROP COLUMN `heroic_required_quest_done`,
|
||||||
|
DROP COLUMN `heroic_required_failed_quest_text`,
|
||||||
|
DROP COLUMN `required_quest_done`,
|
||||||
|
DROP COLUMN `required_failed_text`,
|
||||||
|
ADD COLUMN `access_id` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `name`;
|
||||||
|
|
||||||
|
INSERT INTO `access_requirement` VALUES
|
||||||
|
('1','10','0','0','0','0','0','0',NULL,'0',NULL,'instance Shadowfang Keep (33)'),
|
||||||
|
('2','15','0','0','0','0','0','0',NULL,'0',NULL,'instance The Stockade (34)'),
|
||||||
|
('3','10','0','0','0','0','0','0',NULL,'0',NULL,'instance The Deadmines (36)'),
|
||||||
|
('4','10','0','0','0','0','0','0',NULL,'0',NULL,'instance Wailing Caverns (43)'),
|
||||||
|
('5','15','0','0','0','0','0','0',NULL,'0',NULL,'instance Razorfen Kraul (47)'),
|
||||||
|
('6','10','0','0','0','0','0','0',NULL,'0',NULL,'instance Blackfathom Deeps (48)'),
|
||||||
|
('7','30','0','0','0','0','0','0',NULL,'0',NULL,'instance Uldaman (70)'),
|
||||||
|
('8','15','0','0','0','0','0','0',NULL,'0',NULL,'instance Gnomeregan (90)'),
|
||||||
|
('9','35','0','0','0','0','0','0',NULL,'0',NULL,'instance Sunken Temple (109)'),
|
||||||
|
('10','25','0','0','0','0','0','0',NULL,'0',NULL,'instance Razorfen Downs (129)'),
|
||||||
|
('11','20','0','0','0','0','0','0',NULL,'0',NULL,'instance Scarlet Monastery (189)'),
|
||||||
|
('12','35','0','0','0','0','0','0',NULL,'0',NULL,'instance Zul\'Farrak (209)'),
|
||||||
|
('13','45','0','0','0','0','0','0',NULL,'0',NULL,'instance Blackrock Spire (229)'),
|
||||||
|
('14','40','0','0','0','0','0','0',NULL,'0',NULL,'instance Blackrock Depths (230)'),
|
||||||
|
('15','55','0','16309','0','0','0','0',NULL,'0',NULL,'instance Onyxia\'s Lair (249)'),
|
||||||
|
('16','66','0','0','0','30635','0','10285','You can\'t enter Black Morass until you rescue Thrall from Durnholde Keep.','0',NULL,'instance The Black Morass (269)'),
|
||||||
|
('17','45','0','13704','0','0','0','0',NULL,'0',NULL,'instance Scholomance (289)'),
|
||||||
|
('18','50','0','0','0','0','0','0',NULL,'0',NULL,'instance Zul\'Gurub (309)'),
|
||||||
|
('19','45','0','0','0','0','0','0',NULL,'0',NULL,'instance Stratholme (329)'),
|
||||||
|
('20','30','0','0','0','0','0','0',NULL,'0',NULL,'instance Maraudon (349)'),
|
||||||
|
('21','8','0','0','0','0','0','0',NULL,'0',NULL,'instance Ragefire Chasm (389)'),
|
||||||
|
('22','50','0','0','0','0','0','7487',NULL,'0',NULL,'instance Molten Core (409)'),
|
||||||
|
('23','45','0','0','0','0','0','0',NULL,'0',NULL,'instance Dire Maul (429)'),
|
||||||
|
('24','60','0','0','0','0','0','7761',NULL,'0',NULL,'instance Blackwing Lair (469)'),
|
||||||
|
('25','60','0','0','0','0','0','0',NULL,'0',NULL,'instance Ruins of Ahn\'Qiraj (509)'),
|
||||||
|
('26','60','0','0','0','0','0','0',NULL,'0',NULL,'instance Temple of Ahn\'Qiraj (531)'),
|
||||||
|
('27','68','0','0'/*'24490'*/,'0','0','0','0',NULL,'0',NULL,'instance Karazhan (532)'),
|
||||||
|
('28','60','0','0','0','0','0','0',NULL,'0',NULL,'instance Naxxramas (533)'),
|
||||||
|
('29','70','0','0','0','0','0','0',NULL,'0',NULL,'instance Hyjal Summit (534)'),
|
||||||
|
('30','55','0','0'/*'28395'*/,'0','30637','30622','0',NULL,'0',NULL,'instance The Shattered Halls (540)'),
|
||||||
|
('31','55','0','0','0','30637','30622','0',NULL,'0',NULL,'instance The Blood Furnace (542)'),
|
||||||
|
('32','55','0','0','0','30637','30622','0',NULL,'0',NULL,'instance Hellfire Ramparts (543)'),
|
||||||
|
('33','65','0','0','0','0','0','0',NULL,'0',NULL,'instance Magtheridon\'s Lair (544)'),
|
||||||
|
('34','55','0','0','0','30623','0','0',NULL,'0',NULL,'instance The Steamvault (545)'),
|
||||||
|
('35','55','0','0','0','30623','0','0',NULL,'0',NULL,'instance The Underbog (546)'),
|
||||||
|
('36','55','0','0','0','30623','0','0',NULL,'0',NULL,'instance The Slave Pens (547)'),
|
||||||
|
('37','70','0','0','0','0','0','0'/*'10901'*/,NULL,'0',NULL,'instance Serpentshrine Cavern (548)'),
|
||||||
|
('38','70','0','0'/*'31704'*/,'0','0','0','0',NULL,'0',NULL,'instance The Eye (550)'),
|
||||||
|
('39','68','0','0'/*'31084'*/,'0','30634','0','0',NULL,'0',NULL,'instance The Arcatraz (552)'),
|
||||||
|
('40','68','0','0','0','30634','0','0',NULL,'0',NULL,'instance The Botanica (553)'),
|
||||||
|
('41','68','0','0','0','30634','0','0',NULL,'0',NULL,'instance The Mechanar (554)'),
|
||||||
|
('42','65','0','27991','0','30633','0','0',NULL,'0',NULL,'instance Shadow Labyrinth (555)'),
|
||||||
|
('43','55','0','0','0','30633','0','0',NULL,'0',NULL,'instance Sethekk Halls (556)'),
|
||||||
|
('44','55','0','0','0','30633','0','0',NULL,'0',NULL,'instance Mana-Tombs (557)'),
|
||||||
|
('45','55','0','0','0','30633','0','0',NULL,'0',NULL,'instance Auchenai Crypts (558)'),
|
||||||
|
('46','66','0','0','0','30635','0','0',NULL,'0',NULL,'instance Old Hillsbrad Foothills (560)'),
|
||||||
|
('47','70','0','0','0','0','0','0',NULL,'0',NULL,'instance Black Temple (564)'),
|
||||||
|
('48','65','0','0','0','0','0','0',NULL,'0',NULL,'instance Gruul\'s Lair (565)'),
|
||||||
|
('49','70','0','0','0','0','0','0',NULL,'0',NULL,'instance Zul\'Aman (568)'),
|
||||||
|
('50','70','0','0','0','0','0','0',NULL,'0',NULL,'instance Sunwell Plateau (580)'),
|
||||||
|
('51','70','0','0','0','0','0','0',NULL,'11492','Heroic Difficulty requires completion of the "Hard to Kill" quest.','instance Magisters\' Terrace (585)'),
|
||||||
|
('52','58','0','0','0','0','0','0',NULL,'0',NULL,'Dark Portal');
|
||||||
|
|
||||||
|
UPDATE `instance_template` SET `access_id` = '1' WHERE `map` = '33';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '2' WHERE `map` = '34';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '3' WHERE `map` = '36';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '4' WHERE `map` = '43';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '5' WHERE `map` = '47';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '6' WHERE `map` = '48';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '7' WHERE `map` = '70';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '8' WHERE `map` = '90';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '9' WHERE `map` = '109';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '10' WHERE `map` = '129';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '11' WHERE `map` = '189';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '12' WHERE `map` = '209';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '13' WHERE `map` = '229';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '14' WHERE `map` = '230';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '15' WHERE `map` = '249';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '16' WHERE `map` = '269';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '17' WHERE `map` = '289';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '18' WHERE `map` = '309';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '19' WHERE `map` = '329';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '20' WHERE `map` = '349';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '21' WHERE `map` = '389';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '22' WHERE `map` = '409';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '23' WHERE `map` = '429';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '24' WHERE `map` = '469';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '25' WHERE `map` = '509';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '26' WHERE `map` = '531';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '27' WHERE `map` = '532';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '28' WHERE `map` = '533';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '29' WHERE `map` = '534';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '30' WHERE `map` = '540';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '31' WHERE `map` = '542';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '32' WHERE `map` = '543';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '33' WHERE `map` = '544';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '34' WHERE `map` = '545';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '35' WHERE `map` = '546';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '36' WHERE `map` = '547';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '37' WHERE `map` = '548';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '38' WHERE `map` = '550';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '39' WHERE `map` = '552';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '40' WHERE `map` = '553';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '41' WHERE `map` = '554';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '42' WHERE `map` = '555';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '43' WHERE `map` = '556';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '44' WHERE `map` = '557';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '45' WHERE `map` = '558';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '46' WHERE `map` = '560';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '47' WHERE `map` = '564';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '48' WHERE `map` = '565';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '49' WHERE `map` = '568';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '50' WHERE `map` = '580';
|
||||||
|
UPDATE `instance_template` SET `access_id` = '51' WHERE `map` = '585';
|
||||||
|
UPDATE `areatrigger_teleport` SET `access_id` = '52' WHERE `id` IN ('4352','4354');
|
||||||
@@ -71,4 +71,5 @@ INSTALL(FILES
|
|||||||
1729_world.sql
|
1729_world.sql
|
||||||
1730_world.sql
|
1730_world.sql
|
||||||
1732_world.sql
|
1732_world.sql
|
||||||
|
1164_characters.sql
|
||||||
DESTINATION share/trinity/sql/updates)
|
DESTINATION share/trinity/sql/updates)
|
||||||
@@ -111,6 +111,9 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
|||||||
PhaseChangeTimer = 60000;
|
PhaseChangeTimer = 60000;
|
||||||
|
|
||||||
Phase1 = true;
|
Phase1 = true;
|
||||||
|
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
void Aggro(Unit *who)
|
||||||
@@ -292,6 +295,8 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
|||||||
if(DoGetThreat(target))
|
if(DoGetThreat(target))
|
||||||
DoModifyThreatPercent(target, -100);
|
DoModifyThreatPercent(target, -100);
|
||||||
m_creature->AddThreat(target, 50000000.0f);
|
m_creature->AddThreat(target, 50000000.0f);
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||||
// If VMaps are disabled, this spell can call the whole instance
|
// If VMaps are disabled, this spell can call the whole instance
|
||||||
DoCast(m_creature, SPELL_INSIGNIFIGANCE, true);
|
DoCast(m_creature, SPELL_INSIGNIFIGANCE, true);
|
||||||
DoCast(target, SPELL_FEL_RAGE_TARGET, true);
|
DoCast(target, SPELL_FEL_RAGE_TARGET, true);
|
||||||
@@ -325,6 +330,8 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
|||||||
FelAcidTimer += 2000;
|
FelAcidTimer += 2000;
|
||||||
EjectTimer += 2000;
|
EjectTimer += 2000;
|
||||||
PhaseChangeTimer = 60000;
|
PhaseChangeTimer = 60000;
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
|
||||||
}
|
}
|
||||||
}else PhaseChangeTimer -= diff;
|
}else PhaseChangeTimer -= diff;
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,9 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
|||||||
|
|
||||||
Phase1 = true;
|
Phase1 = true;
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
|
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
void Aggro(Unit *who)
|
||||||
@@ -212,6 +215,8 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
|||||||
PhaseSwitchTimer = 60000;
|
PhaseSwitchTimer = 60000;
|
||||||
m_creature->SetSpeed(MOVE_RUN, 1.2f);
|
m_creature->SetSpeed(MOVE_RUN, 1.2f);
|
||||||
DoZoneInCombat();
|
DoZoneInCombat();
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -222,6 +227,8 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
|||||||
PhaseSwitchTimer = 60000;
|
PhaseSwitchTimer = 60000;
|
||||||
m_creature->SetSpeed(MOVE_RUN, 0.9f);
|
m_creature->SetSpeed(MOVE_RUN, 0.9f);
|
||||||
DoZoneInCombat();
|
DoZoneInCombat();
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||||
|
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||||
}
|
}
|
||||||
}else PhaseSwitchTimer -= diff;
|
}else PhaseSwitchTimer -= diff;
|
||||||
|
|
||||||
|
|||||||
@@ -114,8 +114,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
|||||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
m_creature->setActive(true);
|
m_creature->setActive(true);
|
||||||
|
|
||||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, 6);
|
if(pInstance->GetData(DATA_NIGHTBANE_EVENT) == DONE || pInstance->GetData(DATA_NIGHTBANE_EVENT) == IN_PROGRESS)
|
||||||
if(pInstance->GetData(DATA_NIGHTBANE_EVENT) > 1)
|
|
||||||
{
|
{
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
m_creature->RemoveCorpse();
|
m_creature->RemoveCorpse();
|
||||||
|
|||||||
@@ -65,9 +65,6 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
|||||||
uint64 MastersTerraceDoor[2];
|
uint64 MastersTerraceDoor[2];
|
||||||
uint64 ImageGUID;
|
uint64 ImageGUID;
|
||||||
|
|
||||||
uint8 Nightbane;
|
|
||||||
bool CheckNightbane;
|
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
for (uint8 i = 0; i < ENCOUNTERS; ++i)
|
for (uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||||
@@ -92,10 +89,6 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
|||||||
MastersTerraceDoor[0]= 0;
|
MastersTerraceDoor[0]= 0;
|
||||||
MastersTerraceDoor[1]= 0;
|
MastersTerraceDoor[1]= 0;
|
||||||
ImageGUID = 0;
|
ImageGUID = 0;
|
||||||
|
|
||||||
Nightbane = 0;
|
|
||||||
|
|
||||||
CheckNightbane = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsEncounterInProgress() const
|
bool IsEncounterInProgress() const
|
||||||
@@ -122,12 +115,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
|||||||
case DATA_NETHERSPITE_EVENT: return Encounters[8];
|
case DATA_NETHERSPITE_EVENT: return Encounters[8];
|
||||||
case DATA_CHESS_EVENT: return Encounters[9];
|
case DATA_CHESS_EVENT: return Encounters[9];
|
||||||
case DATA_MALCHEZZAR_EVENT: return Encounters[10];
|
case DATA_MALCHEZZAR_EVENT: return Encounters[10];
|
||||||
case DATA_NIGHTBANE_EVENT:
|
case DATA_NIGHTBANE_EVENT: return Encounters[11];
|
||||||
if(CheckNightbane)
|
|
||||||
{
|
|
||||||
CheckNightbane = false;
|
|
||||||
return Nightbane;
|
|
||||||
}else return Encounters[11];
|
|
||||||
case DATA_OPERA_PERFORMANCE: return OperaEvent;
|
case DATA_OPERA_PERFORMANCE: return OperaEvent;
|
||||||
case DATA_OPERA_OZ_DEATHCOUNT: return OzDeathCount;
|
case DATA_OPERA_OZ_DEATHCOUNT: return OzDeathCount;
|
||||||
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
||||||
@@ -188,11 +176,9 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
|||||||
case DATA_CHESS_EVENT: Encounters[9] = data; break;
|
case DATA_CHESS_EVENT: Encounters[9] = data; break;
|
||||||
case DATA_MALCHEZZAR_EVENT: Encounters[10] = data; break;
|
case DATA_MALCHEZZAR_EVENT: Encounters[10] = data; break;
|
||||||
case DATA_NIGHTBANE_EVENT:
|
case DATA_NIGHTBANE_EVENT:
|
||||||
if(data == 6)
|
if (Encounters[11] == DONE)
|
||||||
{
|
break;
|
||||||
Nightbane;
|
Encounters[11] = data;
|
||||||
CheckNightbane = true;
|
|
||||||
}else Encounters[11] = data;
|
|
||||||
break;
|
break;
|
||||||
case DATA_OPERA_OZ_DEATHCOUNT: ++OzDeathCount; break;
|
case DATA_OPERA_OZ_DEATHCOUNT: ++OzDeathCount; break;
|
||||||
}
|
}
|
||||||
@@ -268,7 +254,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
|||||||
std::istringstream loadStream(in);
|
std::istringstream loadStream(in);
|
||||||
loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3]
|
loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3]
|
||||||
>> Encounters[4] >> Encounters[5] >> Encounters[6] >> Encounters[7]
|
>> Encounters[4] >> Encounters[5] >> Encounters[6] >> Encounters[7]
|
||||||
>> Encounters[8] >> Encounters[9] >> Encounters[10];
|
>> Encounters[8] >> Encounters[9] >> Encounters[10] >> Encounters[11];
|
||||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||||
if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
|
if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
|
||||||
Encounters[i] = NOT_STARTED;
|
Encounters[i] = NOT_STARTED;
|
||||||
|
|||||||
+3
-3
@@ -201,9 +201,6 @@ struct TRINITY_DLL_DECL mob_ragin_flamesAI : public ScriptedAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
//Check_Timer
|
//Check_Timer
|
||||||
if(Check_Timer < diff)
|
if(Check_Timer < diff)
|
||||||
{
|
{
|
||||||
@@ -219,6 +216,9 @@ struct TRINITY_DLL_DECL mob_ragin_flamesAI : public ScriptedAI
|
|||||||
Check_Timer = 1000;
|
Check_Timer = 1000;
|
||||||
}else Check_Timer -= diff;
|
}else Check_Timer -= diff;
|
||||||
|
|
||||||
|
if (!UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!onlyonce)
|
if (!onlyonce)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ struct TRINITY_DLL_DECL instance_mechanar : public ScriptedInstance
|
|||||||
bool IsEncounterInProgress() const
|
bool IsEncounterInProgress() const
|
||||||
{
|
{
|
||||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||||
if(Encounters[i]) return true;
|
if(Encounters[i] == IN_PROGRESS)
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-23
@@ -727,42 +727,29 @@ void BattleGround::RewardMark(Player *plr,uint32 count)
|
|||||||
if(plr->GetDummyAura(SPELL_AURA_PLAYER_INACTIVE))
|
if(plr->GetDummyAura(SPELL_AURA_PLAYER_INACTIVE))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BattleGroundMarks mark;
|
if(!plr || !count)
|
||||||
bool IsSpell;
|
return;
|
||||||
|
|
||||||
|
BattleGroundMarks mark;
|
||||||
switch(GetTypeID())
|
switch(GetTypeID())
|
||||||
{
|
{
|
||||||
case BATTLEGROUND_AV:
|
case BATTLEGROUND_AV:
|
||||||
IsSpell = true;
|
mark = ITEM_AV_MARK_OF_HONOR;
|
||||||
if(count == ITEM_WINNER_COUNT)
|
|
||||||
mark = SPELL_AV_MARK_WINNER;
|
|
||||||
else
|
|
||||||
mark = SPELL_AV_MARK_LOSER;
|
|
||||||
break;
|
break;
|
||||||
case BATTLEGROUND_WS:
|
case BATTLEGROUND_WS:
|
||||||
IsSpell = true;
|
mark = ITEM_WS_MARK_OF_HONOR;
|
||||||
if(count == ITEM_WINNER_COUNT)
|
|
||||||
mark = SPELL_WS_MARK_WINNER;
|
|
||||||
else
|
|
||||||
mark = SPELL_WS_MARK_LOSER;
|
|
||||||
break;
|
break;
|
||||||
case BATTLEGROUND_AB:
|
case BATTLEGROUND_AB:
|
||||||
IsSpell = true;
|
mark = ITEM_AB_MARK_OF_HONOR;
|
||||||
if(count == ITEM_WINNER_COUNT)
|
|
||||||
mark = SPELL_AB_MARK_WINNER;
|
|
||||||
else
|
|
||||||
mark = SPELL_AB_MARK_LOSER;
|
|
||||||
break;
|
break;
|
||||||
case BATTLEGROUND_EY:
|
case BATTLEGROUND_EY:
|
||||||
IsSpell = false;
|
|
||||||
mark = ITEM_EY_MARK_OF_HONOR;
|
mark = ITEM_EY_MARK_OF_HONOR;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IsSpell)
|
if ( objmgr.GetItemPrototype( mark ) )
|
||||||
plr->CastSpell(plr, mark, true);
|
|
||||||
else if ( objmgr.GetItemPrototype( mark ) )
|
|
||||||
{
|
{
|
||||||
ItemPosCountVec dest;
|
ItemPosCountVec dest;
|
||||||
uint32 no_space_count = 0;
|
uint32 no_space_count = 0;
|
||||||
@@ -770,7 +757,7 @@ void BattleGround::RewardMark(Player *plr,uint32 count)
|
|||||||
if( msg != EQUIP_ERR_OK ) // convert to possible store amount
|
if( msg != EQUIP_ERR_OK ) // convert to possible store amount
|
||||||
count -= no_space_count;
|
count -= no_space_count;
|
||||||
|
|
||||||
if( count != 0 && !dest.empty()) // can add some
|
if(!dest.empty()) // can add some
|
||||||
if(Item* item = plr->StoreNewItem( dest, mark, true, 0))
|
if(Item* item = plr->StoreNewItem( dest, mark, true, 0))
|
||||||
plr->SendNewItem(item,count,false,true);
|
plr->SendNewItem(item,count,false,true);
|
||||||
|
|
||||||
|
|||||||
@@ -53,12 +53,9 @@ enum BattleGroundQuests
|
|||||||
|
|
||||||
enum BattleGroundMarks
|
enum BattleGroundMarks
|
||||||
{
|
{
|
||||||
SPELL_WS_MARK_LOSER = 24950,
|
ITEM_AV_MARK_OF_HONOR = 20560,
|
||||||
SPELL_WS_MARK_WINNER = 24951,
|
ITEM_WS_MARK_OF_HONOR = 20558,
|
||||||
SPELL_AB_MARK_LOSER = 24952,
|
ITEM_AB_MARK_OF_HONOR = 20559,
|
||||||
SPELL_AB_MARK_WINNER = 24953,
|
|
||||||
SPELL_AV_MARK_LOSER = 24954,
|
|
||||||
SPELL_AV_MARK_WINNER = 24955,
|
|
||||||
ITEM_EY_MARK_OF_HONOR = 29024
|
ITEM_EY_MARK_OF_HONOR = 29024
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,23 +30,6 @@
|
|||||||
|
|
||||||
using namespace Trinity;
|
using namespace Trinity;
|
||||||
|
|
||||||
/*void
|
|
||||||
Trinity::PlayerNotifier::Visit(PlayerMapType &m)
|
|
||||||
{
|
|
||||||
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
|
||||||
{
|
|
||||||
if( iter->getSource() == &i_player )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
iter->getSource()->UpdateVisibilityOf(&i_player);
|
|
||||||
i_player.UpdateVisibilityOf(iter->getSource());
|
|
||||||
|
|
||||||
if (!i_player.GetSharedVisionList().empty())
|
|
||||||
for (SharedVisionList::const_iterator it = i_player.GetSharedVisionList().begin(); it != i_player.GetSharedVisionList().end(); ++it)
|
|
||||||
(*it)->UpdateVisibilityOf(iter->getSource());
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
VisibleChangesNotifier::Visit(PlayerMapType &m)
|
VisibleChangesNotifier::Visit(PlayerMapType &m)
|
||||||
{
|
{
|
||||||
@@ -60,27 +43,7 @@ VisibleChangesNotifier::Visit(PlayerMapType &m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VisibleNotifier::Visit(PlayerMapType &m)
|
PlayerRelocationNotifier::Notify()
|
||||||
{
|
|
||||||
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
|
||||||
{
|
|
||||||
if( iter->getSource() == &i_player )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
iter->getSource()->UpdateVisibilityOf(&i_player);
|
|
||||||
//i_player.UpdateVisibilityOf(iter->getSource());
|
|
||||||
|
|
||||||
//if (!i_player.GetSharedVisionList().empty())
|
|
||||||
// for (SharedVisionList::const_iterator it = i_player.GetSharedVisionList().begin(); it != i_player.GetSharedVisionList().end(); ++it)
|
|
||||||
// (*it)->UpdateVisibilityOf(iter->getSource());
|
|
||||||
|
|
||||||
i_player.UpdateVisibilityOf(iter->getSource(),i_data,i_data_updates,i_visibleNow);
|
|
||||||
i_clientGUIDs.erase(iter->getSource()->GetGUID());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
VisibleNotifier::Notify()
|
|
||||||
{
|
{
|
||||||
// at this moment i_clientGUIDs have guids that not iterate at grid level checks
|
// at this moment i_clientGUIDs have guids that not iterate at grid level checks
|
||||||
// but exist one case when this possible and object not out of range: transports
|
// but exist one case when this possible and object not out of range: transports
|
||||||
@@ -144,15 +107,9 @@ VisibleNotifier::Notify()
|
|||||||
|
|
||||||
// send data at target visibility change (adding to client)
|
// send data at target visibility change (adding to client)
|
||||||
for(std::set<WorldObject*>::const_iterator vItr = i_visibleNow.begin(); vItr != i_visibleNow.end(); ++vItr)
|
for(std::set<WorldObject*>::const_iterator vItr = i_visibleNow.begin(); vItr != i_visibleNow.end(); ++vItr)
|
||||||
{
|
|
||||||
// target aura duration for caster show only if target exist at caster client
|
// target aura duration for caster show only if target exist at caster client
|
||||||
if((*vItr)!=&i_player && (*vItr)->isType(TYPEMASK_UNIT))
|
if((*vItr)!=&i_player && (*vItr)->isType(TYPEMASK_UNIT))
|
||||||
i_player.SendAurasForTarget((Unit*)(*vItr));
|
i_player.SendInitialVisiblePackets((Unit*)(*vItr));
|
||||||
|
|
||||||
// non finished movements show to player
|
|
||||||
if((*vItr)->GetTypeId()==TYPEID_UNIT && ((Creature*)(*vItr))->isAlive())
|
|
||||||
((Creature*)(*vItr))->SendMonsterMoveWithSpeedToCurrentDestination(&i_player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+25
-36
@@ -38,16 +38,7 @@ class Player;
|
|||||||
|
|
||||||
namespace Trinity
|
namespace Trinity
|
||||||
{
|
{
|
||||||
|
struct TRINITY_DLL_DECL PlayerRelocationNotifier
|
||||||
/*struct TRINITY_DLL_DECL PlayerNotifier
|
|
||||||
{
|
|
||||||
explicit PlayerNotifier(Player &pl) : i_player(pl) {}
|
|
||||||
void Visit(PlayerMapType &);
|
|
||||||
template<class SKIP> void Visit(GridRefManager<SKIP> &) {}
|
|
||||||
Player &i_player;
|
|
||||||
};*/
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL VisibleNotifier
|
|
||||||
{
|
{
|
||||||
Player &i_player;
|
Player &i_player;
|
||||||
UpdateData i_data;
|
UpdateData i_data;
|
||||||
@@ -55,12 +46,28 @@ namespace Trinity
|
|||||||
Player::ClientGUIDs i_clientGUIDs;
|
Player::ClientGUIDs i_clientGUIDs;
|
||||||
std::set<WorldObject*> i_visibleNow;
|
std::set<WorldObject*> i_visibleNow;
|
||||||
|
|
||||||
explicit VisibleNotifier(Player &player) : i_player(player),i_clientGUIDs(player.m_clientGUIDs) {}
|
PlayerRelocationNotifier(Player &player) : i_player(player),i_clientGUIDs(player.m_clientGUIDs) {}
|
||||||
template<class T> void Visit(GridRefManager<T> &m);
|
|
||||||
void Visit(PlayerMapType &);
|
#ifdef WIN32
|
||||||
|
template<class T> inline void Visit(GridRefManager<T> &);
|
||||||
|
template<> inline void Visit(PlayerMapType &);
|
||||||
|
template<> inline void Visit(CreatureMapType &);
|
||||||
|
#endif
|
||||||
|
|
||||||
void Notify(void);
|
void Notify(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TRINITY_DLL_DECL CreatureRelocationNotifier
|
||||||
|
{
|
||||||
|
Creature &i_creature;
|
||||||
|
CreatureRelocationNotifier(Creature &c) : i_creature(c) {}
|
||||||
|
template<class T> void Visit(GridRefManager<T> &) {}
|
||||||
|
#ifdef WIN32
|
||||||
|
template<> inline void Visit(PlayerMapType &);
|
||||||
|
template<> inline void Visit(CreatureMapType &);
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL VisibleChangesNotifier
|
struct TRINITY_DLL_DECL VisibleChangesNotifier
|
||||||
{
|
{
|
||||||
WorldObject &i_object;
|
WorldObject &i_object;
|
||||||
@@ -170,25 +177,6 @@ namespace Trinity
|
|||||||
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
|
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL PlayerRelocationNotifier
|
|
||||||
{
|
|
||||||
Player &i_player;
|
|
||||||
PlayerRelocationNotifier(Player &pl) : i_player(pl) {}
|
|
||||||
template<class T> void Visit(GridRefManager<T> &) {}
|
|
||||||
void Visit(PlayerMapType &);
|
|
||||||
void Visit(CreatureMapType &);
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL CreatureRelocationNotifier
|
|
||||||
{
|
|
||||||
Creature &i_creature;
|
|
||||||
CreatureRelocationNotifier(Creature &c) : i_creature(c) {}
|
|
||||||
template<class T> void Visit(GridRefManager<T> &) {}
|
|
||||||
#ifdef WIN32
|
|
||||||
template<> void Visit(PlayerMapType &);
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL DynamicObjectUpdater
|
struct TRINITY_DLL_DECL DynamicObjectUpdater
|
||||||
{
|
{
|
||||||
DynamicObject &i_dynobject;
|
DynamicObject &i_dynobject;
|
||||||
@@ -1045,10 +1033,11 @@ namespace Trinity
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
template<> void PlayerRelocationNotifier::Visit<Creature>(CreatureMapType &);
|
template<class T> inline void PlayerRelocationNotifier::Visit(GridRefManager<T> &);
|
||||||
template<> void PlayerRelocationNotifier::Visit<Player>(PlayerMapType &);
|
template<> inline void PlayerRelocationNotifier::Visit<Creature>(CreatureMapType &);
|
||||||
template<> void CreatureRelocationNotifier::Visit<Player>(PlayerMapType &);
|
template<> inline void PlayerRelocationNotifier::Visit<Player>(PlayerMapType &);
|
||||||
template<> void CreatureRelocationNotifier::Visit<Creature>(CreatureMapType &);
|
template<> inline void CreatureRelocationNotifier::Visit<Player>(PlayerMapType &);
|
||||||
|
template<> inline void CreatureRelocationNotifier::Visit<Creature>(CreatureMapType &);
|
||||||
template<> inline void DynamicObjectUpdater::Visit<Creature>(CreatureMapType &);
|
template<> inline void DynamicObjectUpdater::Visit<Creature>(CreatureMapType &);
|
||||||
template<> inline void DynamicObjectUpdater::Visit<Player>(PlayerMapType &);
|
template<> inline void DynamicObjectUpdater::Visit<Player>(PlayerMapType &);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -29,17 +29,6 @@
|
|||||||
#include "CreatureAI.h"
|
#include "CreatureAI.h"
|
||||||
#include "SpellAuras.h"
|
#include "SpellAuras.h"
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline void
|
|
||||||
Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
|
|
||||||
{
|
|
||||||
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
|
|
||||||
{
|
|
||||||
i_player.UpdateVisibilityOf(iter->getSource(),i_data,i_data_updates,i_visibleNow);
|
|
||||||
i_clientGUIDs.erase(iter->getSource()->GetGUID());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
Trinity::ObjectUpdater::Visit(CreatureMapType &m)
|
Trinity::ObjectUpdater::Visit(CreatureMapType &m)
|
||||||
{
|
{
|
||||||
@@ -48,28 +37,10 @@ Trinity::ObjectUpdater::Visit(CreatureMapType &m)
|
|||||||
iter->getSource()->Update(i_timeDiff);
|
iter->getSource()->Update(i_timeDiff);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
|
||||||
Trinity::PlayerRelocationNotifier::Visit(PlayerMapType &m)
|
|
||||||
{
|
|
||||||
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
|
||||||
{
|
|
||||||
if(&i_player==iter->getSource())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// visibility for players updated by ObjectAccessor::UpdateVisibilityFor calls in appropriate places
|
|
||||||
|
|
||||||
// Cancel Trade
|
|
||||||
if(i_player.GetTrader()==iter->getSource())
|
|
||||||
// iteraction distance
|
|
||||||
if(!i_player.IsWithinDistInMap(iter->getSource(), 5))
|
|
||||||
i_player.GetSession()->SendCancelTrade(); // will clode both side trade windows
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
|
inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
|
||||||
{
|
{
|
||||||
// update creature visibility at player/creature move
|
if(!pl->isAlive() || !c->isAlive() || pl->isInFlight())
|
||||||
pl->UpdateVisibilityOf(c);
|
return;
|
||||||
|
|
||||||
// Creature AI reaction
|
// Creature AI reaction
|
||||||
if(c->HasReactState(REACT_AGGRESSIVE) && !c->hasUnitState(UNIT_STAT_SIGHTLESS))
|
if(c->HasReactState(REACT_AGGRESSIVE) && !c->hasUnitState(UNIT_STAT_SIGHTLESS))
|
||||||
@@ -94,27 +65,71 @@ inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline void
|
||||||
|
Trinity::PlayerRelocationNotifier::Visit(GridRefManager<T> &m)
|
||||||
|
{
|
||||||
|
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||||
|
{
|
||||||
|
i_player.UpdateVisibilityOf(iter->getSource(),i_data,i_data_updates,i_visibleNow);
|
||||||
|
i_clientGUIDs.erase(iter->getSource()->GetGUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline void
|
||||||
|
Trinity::PlayerRelocationNotifier::Visit(PlayerMapType &m)
|
||||||
|
{
|
||||||
|
for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||||
|
{
|
||||||
|
if(iter->getSource()->m_Notified) //self is also skipped in this check
|
||||||
|
continue;
|
||||||
|
|
||||||
|
i_player.UpdateVisibilityOf(iter->getSource(),i_data,i_data_updates,i_visibleNow);
|
||||||
|
i_clientGUIDs.erase(iter->getSource()->GetGUID());
|
||||||
|
|
||||||
|
iter->getSource()->UpdateVisibilityOf(&i_player);
|
||||||
|
|
||||||
|
//if (!i_player.GetSharedVisionList().empty())
|
||||||
|
// for (SharedVisionList::const_iterator it = i_player.GetSharedVisionList().begin(); it != i_player.GetSharedVisionList().end(); ++it)
|
||||||
|
// (*it)->UpdateVisibilityOf(iter->getSource());
|
||||||
|
|
||||||
|
// Cancel Trade
|
||||||
|
if(i_player.GetTrader()==iter->getSource())
|
||||||
|
if(!i_player.IsWithinDistInMap(iter->getSource(), 5)) // iteraction distance
|
||||||
|
i_player.GetSession()->SendCancelTrade(); // will clode both side trade windows
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
inline void
|
inline void
|
||||||
Trinity::PlayerRelocationNotifier::Visit(CreatureMapType &m)
|
Trinity::PlayerRelocationNotifier::Visit(CreatureMapType &m)
|
||||||
{
|
{
|
||||||
if(!i_player.isAlive() || i_player.isInFlight())
|
for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||||
return;
|
{
|
||||||
|
if(iter->getSource()->m_Notified)
|
||||||
|
continue;
|
||||||
|
|
||||||
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
i_player.UpdateVisibilityOf(iter->getSource(),i_data,i_data_updates,i_visibleNow);
|
||||||
if( !iter->getSource()->m_Notified && iter->getSource()->isAlive())
|
i_clientGUIDs.erase(iter->getSource()->GetGUID());
|
||||||
PlayerCreatureRelocationWorker(&i_player,iter->getSource());
|
|
||||||
|
PlayerCreatureRelocationWorker(&i_player, iter->getSource());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline void
|
inline void
|
||||||
Trinity::CreatureRelocationNotifier::Visit(PlayerMapType &m)
|
Trinity::CreatureRelocationNotifier::Visit(PlayerMapType &m)
|
||||||
{
|
{
|
||||||
if(!i_creature.isAlive())
|
for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||||
return;
|
{
|
||||||
|
if(iter->getSource()->m_Notified)
|
||||||
|
continue;
|
||||||
|
|
||||||
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
iter->getSource()->UpdateVisibilityOf(&i_creature);
|
||||||
if( !iter->getSource()->m_Notified && iter->getSource()->isAlive() && !iter->getSource()->isInFlight())
|
|
||||||
PlayerCreatureRelocationWorker(iter->getSource(), &i_creature);
|
PlayerCreatureRelocationWorker(iter->getSource(), &i_creature);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@@ -124,11 +139,15 @@ Trinity::CreatureRelocationNotifier::Visit(CreatureMapType &m)
|
|||||||
if(!i_creature.isAlive())
|
if(!i_creature.isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||||
{
|
{
|
||||||
Creature* c = iter->getSource();
|
if(iter->getSource()->m_Notified)
|
||||||
if( !iter->getSource()->m_Notified && c != &i_creature && c->isAlive())
|
continue;
|
||||||
CreatureCreatureRelocationWorker(c, &i_creature);
|
|
||||||
|
if(!iter->getSource()->isAlive())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CreatureCreatureRelocationWorker(iter->getSource(), &i_creature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-20
@@ -624,34 +624,15 @@ void Map::RelocationNotify()
|
|||||||
|
|
||||||
if(unit->GetTypeId() == TYPEID_PLAYER)
|
if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
//UpdatePlayerVisibility((Player*)unit, cell, val);
|
|
||||||
//Trinity::PlayerNotifier pl_notifier(*player);
|
|
||||||
//VisitWorld(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), pl_notifier);
|
|
||||||
|
|
||||||
//UpdateObjectsVisibilityFor((Player*)unit, cell, val);
|
|
||||||
Trinity::VisibleNotifier ob_notifier(*((Player*)unit));
|
|
||||||
VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), ob_notifier);
|
|
||||||
ob_notifier.Notify();
|
|
||||||
|
|
||||||
Trinity::PlayerRelocationNotifier notifier(*((Player*)unit));
|
Trinity::PlayerRelocationNotifier notifier(*((Player*)unit));
|
||||||
VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
|
VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
|
||||||
|
notifier.Notify();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Trinity::CreatureRelocationNotifier notifier(*((Creature*)unit));
|
Trinity::CreatureRelocationNotifier notifier(*((Creature*)unit));
|
||||||
VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
|
VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update visibility back to player who is controlling the unit
|
|
||||||
if(unit->GetSharedVisionList().size())
|
|
||||||
{
|
|
||||||
for(SharedVisionList::const_iterator it = unit->GetSharedVisionList().begin(); it != unit->GetSharedVisionList().end(); ++it)
|
|
||||||
{
|
|
||||||
Trinity::VisibleNotifier ob_notifier(**it);
|
|
||||||
VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), ob_notifier);
|
|
||||||
ob_notifier.Notify();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Clear list
|
//Clear list
|
||||||
@@ -768,6 +749,28 @@ void Map::Update(const uint32 &t_diff)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update bindsight players
|
||||||
|
if(obj->isType(TYPEMASK_UNIT))
|
||||||
|
{
|
||||||
|
if(!((Unit*)obj)->GetSharedVisionList().empty())
|
||||||
|
for(SharedVisionList::const_iterator it = ((Unit*)obj)->GetSharedVisionList().begin(); it != ((Unit*)obj)->GetSharedVisionList().end(); ++it)
|
||||||
|
{
|
||||||
|
Trinity::PlayerRelocationNotifier notifier(**it);
|
||||||
|
VisitAll(obj->GetPositionX(), obj->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
|
||||||
|
notifier.Notify();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(obj->GetTypeId() == TYPEID_DYNAMICOBJECT)
|
||||||
|
{
|
||||||
|
if(Unit *caster = ((DynamicObject*)obj)->GetCaster())
|
||||||
|
if(caster->GetTypeId() == TYPEID_PLAYER && caster->GetUInt64Value(PLAYER_FARSIGHT) == obj->GetGUID())
|
||||||
|
{
|
||||||
|
Trinity::PlayerRelocationNotifier notifier(*((Player*)caster));
|
||||||
|
VisitAll(obj->GetPositionX(), obj->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
|
||||||
|
notifier.Notify();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6625,6 +6625,7 @@ void ObjectMgr::LoadSpellDisabledEntrys()
|
|||||||
{
|
{
|
||||||
m_DisabledPlayerSpells.clear(); // need for reload case
|
m_DisabledPlayerSpells.clear(); // need for reload case
|
||||||
m_DisabledCreatureSpells.clear();
|
m_DisabledCreatureSpells.clear();
|
||||||
|
m_DisabledPetSpells.clear();
|
||||||
QueryResult *result = WorldDatabase.Query("SELECT entry, disable_mask FROM spell_disabled");
|
QueryResult *result = WorldDatabase.Query("SELECT entry, disable_mask FROM spell_disabled");
|
||||||
|
|
||||||
uint32 total_count = 0;
|
uint32 total_count = 0;
|
||||||
@@ -6657,6 +6658,8 @@ void ObjectMgr::LoadSpellDisabledEntrys()
|
|||||||
m_DisabledPlayerSpells.insert(spellid);
|
m_DisabledPlayerSpells.insert(spellid);
|
||||||
if(disable_mask & SPELL_DISABLE_CREATURE)
|
if(disable_mask & SPELL_DISABLE_CREATURE)
|
||||||
m_DisabledCreatureSpells.insert(spellid);
|
m_DisabledCreatureSpells.insert(spellid);
|
||||||
|
if(disable_mask & SPELL_DISABLE_PET)
|
||||||
|
m_DisabledPetSpells.insert(spellid);
|
||||||
++total_count;
|
++total_count;
|
||||||
} while ( result->NextRow() );
|
} while ( result->NextRow() );
|
||||||
|
|
||||||
|
|||||||
@@ -739,6 +739,7 @@ class ObjectMgr
|
|||||||
void LoadSpellDisabledEntrys();
|
void LoadSpellDisabledEntrys();
|
||||||
bool IsPlayerSpellDisabled(uint32 spellid) { return (m_DisabledPlayerSpells.count(spellid) != 0); }
|
bool IsPlayerSpellDisabled(uint32 spellid) { return (m_DisabledPlayerSpells.count(spellid) != 0); }
|
||||||
bool IsCreatureSpellDisabled(uint32 spellid) { return (m_DisabledCreatureSpells.count(spellid) != 0); }
|
bool IsCreatureSpellDisabled(uint32 spellid) { return (m_DisabledCreatureSpells.count(spellid) != 0); }
|
||||||
|
bool IsPetSpellDisabled(uint32 spellid) { return (m_DisabledPetSpells.count(spellid) != 0); }
|
||||||
|
|
||||||
int GetIndexForLocale(LocaleConstant loc);
|
int GetIndexForLocale(LocaleConstant loc);
|
||||||
LocaleConstant GetLocaleForIndex(int i);
|
LocaleConstant GetLocaleForIndex(int i);
|
||||||
@@ -859,6 +860,7 @@ class ObjectMgr
|
|||||||
|
|
||||||
std::set<uint32> m_DisabledPlayerSpells;
|
std::set<uint32> m_DisabledPlayerSpells;
|
||||||
std::set<uint32> m_DisabledCreatureSpells;
|
std::set<uint32> m_DisabledCreatureSpells;
|
||||||
|
std::set<uint32> m_DisabledPetSpells;
|
||||||
|
|
||||||
GraveYardMap mGraveYardMap;
|
GraveYardMap mGraveYardMap;
|
||||||
|
|
||||||
|
|||||||
+15
-24
@@ -17597,19 +17597,7 @@ void Player::HandleStealthedUnitsDetection()
|
|||||||
sLog.outDebug("Object %u (Type: %u) is detected in stealth by player %u. Distance = %f",(*i)->GetGUIDLow(),(*i)->GetTypeId(),GetGUIDLow(),GetDistance(*i));
|
sLog.outDebug("Object %u (Type: %u) is detected in stealth by player %u. Distance = %f",(*i)->GetGUIDLow(),(*i)->GetTypeId(),GetGUIDLow(),GetDistance(*i));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// target aura duration for caster show only if target exist at caster client
|
SendInitialVisiblePackets(*i);
|
||||||
// send data at target visibility change (adding to client)
|
|
||||||
if((*i)!=this && (*i)->isType(TYPEMASK_UNIT))
|
|
||||||
{
|
|
||||||
SendAurasForTarget(*i);
|
|
||||||
//if(((Unit*)(*i))->isAlive()) //should be always alive
|
|
||||||
{
|
|
||||||
if((*i)->GetTypeId()==TYPEID_UNIT)
|
|
||||||
((Creature*)(*i))->SendMonsterMoveWithSpeedToCurrentDestination(this);
|
|
||||||
if(((Unit*)(*i))->getVictim())
|
|
||||||
((Unit*)(*i))->SendAttackStart(((Unit*)(*i))->getVictim());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18710,21 +18698,24 @@ void Player::UpdateVisibilityOf(WorldObject* target)
|
|||||||
|
|
||||||
// target aura duration for caster show only if target exist at caster client
|
// target aura duration for caster show only if target exist at caster client
|
||||||
// send data at target visibility change (adding to client)
|
// send data at target visibility change (adding to client)
|
||||||
if(target!=this && target->isType(TYPEMASK_UNIT))
|
if(target->isType(TYPEMASK_UNIT))
|
||||||
{
|
SendInitialVisiblePackets((Unit*)target);
|
||||||
SendAurasForTarget((Unit*)target);
|
|
||||||
if(((Unit*)target)->isAlive())
|
|
||||||
{
|
|
||||||
if(target->GetTypeId()==TYPEID_UNIT)
|
|
||||||
((Creature*)target)->SendMonsterMoveWithSpeedToCurrentDestination(this);
|
|
||||||
if(((Unit*)target)->getVictim())
|
|
||||||
((Unit*)target)->SendAttackStart(((Unit*)target)->getVictim());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::SendInitialVisiblePackets(Unit* target)
|
||||||
|
{
|
||||||
|
SendAurasForTarget(target);
|
||||||
|
if(target->isAlive())
|
||||||
|
{
|
||||||
|
if(target->GetMotionMaster()->GetCurrentMovementGeneratorType() != IDLE_MOTION_TYPE)
|
||||||
|
target->SendMonsterMoveWithSpeedToCurrentDestination(this);
|
||||||
|
if(target->hasUnitState(UNIT_STAT_MELEE_ATTACKING) && target->getVictim())
|
||||||
|
target->SendAttackStart(target->getVictim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline void UpdateVisibilityOf_helper(std::set<uint64>& s64, T* target)
|
inline void UpdateVisibilityOf_helper(std::set<uint64>& s64, T* target)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2100,6 +2100,7 @@ class TRINITY_DLL_SPEC Player : public Unit
|
|||||||
bool IsVisibleGloballyFor(Player* pl) const;
|
bool IsVisibleGloballyFor(Player* pl) const;
|
||||||
|
|
||||||
void UpdateVisibilityOf(WorldObject* target);
|
void UpdateVisibilityOf(WorldObject* target);
|
||||||
|
void SendInitialVisiblePackets(Unit* target);
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void UpdateVisibilityOf(T* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
void UpdateVisibilityOf(T* target, UpdateData& data, UpdateDataMapType& data_updates, std::set<WorldObject*>& visibleNow);
|
||||||
|
|||||||
+10
-1
@@ -2031,7 +2031,7 @@ void Spell::prepare(SpellCastTargets const* targets, Aura* triggeredByAura)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_caster->GetTypeId() == TYPEID_PLAYER || (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isPet()))
|
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
if(objmgr.IsPlayerSpellDisabled(m_spellInfo->Id))
|
if(objmgr.IsPlayerSpellDisabled(m_spellInfo->Id))
|
||||||
{
|
{
|
||||||
@@ -2040,6 +2040,15 @@ void Spell::prepare(SpellCastTargets const* targets, Aura* triggeredByAura)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isPet())
|
||||||
|
{
|
||||||
|
if(objmgr.IsPetSpellDisabled(m_spellInfo->Id))
|
||||||
|
{
|
||||||
|
SendCastResult(SPELL_FAILED_SPELL_UNAVAILABLE);
|
||||||
|
finish(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(objmgr.IsCreatureSpellDisabled(m_spellInfo->Id))
|
if(objmgr.IsCreatureSpellDisabled(m_spellInfo->Id))
|
||||||
|
|||||||
@@ -2786,33 +2786,7 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype)
|
|||||||
|
|
||||||
// we succeeded in creating at least one item, so a levelup is possible
|
// we succeeded in creating at least one item, so a levelup is possible
|
||||||
player->UpdateCraftSkill(m_spellInfo->Id);
|
player->UpdateCraftSkill(m_spellInfo->Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for battleground marks send by mail if not add all expected
|
|
||||||
if(no_space > 0 )
|
|
||||||
{
|
|
||||||
BattleGroundTypeId bgType;
|
|
||||||
switch(m_spellInfo->Id)
|
|
||||||
{
|
|
||||||
case SPELL_AV_MARK_WINNER:
|
|
||||||
case SPELL_AV_MARK_LOSER:
|
|
||||||
bgType = BATTLEGROUND_AV;
|
|
||||||
break;
|
|
||||||
case SPELL_WS_MARK_WINNER:
|
|
||||||
case SPELL_WS_MARK_LOSER:
|
|
||||||
bgType = BATTLEGROUND_WS;
|
|
||||||
break;
|
|
||||||
case SPELL_AB_MARK_WINNER:
|
|
||||||
case SPELL_AB_MARK_LOSER:
|
|
||||||
bgType = BATTLEGROUND_AB;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(bgType))
|
|
||||||
bg->SendRewardMarkByMail(player,newitemid,no_space);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectCreateItem(uint32 i)
|
void Spell::EffectCreateItem(uint32 i)
|
||||||
|
|||||||
+2
-1
@@ -257,7 +257,8 @@ enum SpellFamilyNames
|
|||||||
enum SpellDisableTypes
|
enum SpellDisableTypes
|
||||||
{
|
{
|
||||||
SPELL_DISABLE_PLAYER = 1,
|
SPELL_DISABLE_PLAYER = 1,
|
||||||
SPELL_DISABLE_CREATURE = 2
|
SPELL_DISABLE_CREATURE = 2,
|
||||||
|
SPELL_DISABLE_PET = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SpellEffectTargetTypes
|
enum SpellEffectTargetTypes
|
||||||
|
|||||||
Reference in New Issue
Block a user