mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Fix negative spawntimesecs handling in gameobjects - they now start off unspawned and disappear correctly upon despawn (even if PCs aren't moving)
Quest 308 changed to not require completion of 403 (offi does not have 403 as quest, just a gossip) Quest 308 finish script changed to show unguarded barrel earlier (as it does in offi) Author of all of these: totoro. --HG-- branch : trunk
This commit is contained in:
29
sql/updates/5144_world_TDB.sql
Normal file
29
sql/updates/5144_world_TDB.sql
Normal file
@@ -0,0 +1,29 @@
|
||||
-- Distracting Jarven does not depend on taking quest from the guarded barrel, it's available while Bitter Rivals is active
|
||||
update quest_template set PrevQuestID = -310 where entry = 308;
|
||||
|
||||
-- Make the unguarded barrel appear sooner after Jarven leaves
|
||||
delete from `QUEST_END_SCRIPTS` where `id` = 308;
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','0','3','0','0','0','-5601.64','-541.38','392.42','0.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','0','0','0','0','2000000077','0','0','0','0');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','2','3','0','0','0','-5597.94','-542.04','392.42','5.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','3','3','0','0','0','-5597.95','-548.43','395.48','4.7');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','3','9','35875','30','0','0','0','0','0');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','7','3','0','0','0','-5605.31','-549.33','399.09','3.1');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','10','3','0','0','0','-5607.55','-546.63','399.09','1.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','14','3','0','0','0','-5597.52','-538.75','399.09','1.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','18','3','0','0','0','-5597.62','-530.24','399.65','3');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','21','3','0','0','0','-5603.67','-529.91','399.65','4.2');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','25','0','0','0','2000000056','0','0','0','0');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','36','3','0','0','0','-5603.67','-529.91','399.65','4.2');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','39','3','0','0','0','-5597.62','-530.24','399.65','3');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','42','3','0','0','0','-5597.52','-538.75','399.09','1.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','45','3','0','0','0','-5607.55','-546.63','399.09','1.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','48','3','0','0','0','-5605.31','-549.33','399.09','3.1');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','51','3','0','0','0','-5597.95','-548.43','395.48','4.7');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','54','3','0','0','0','-5597.94','-542.04','392.42','5.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','55','0','0','0','2000000078','0','0','0','0');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','58','3','0','0','0','-5601.64','-541.38','392.42','0.5');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','60','3','0','0','0','-5605.96','-544.45','392.43','0.9');
|
||||
insert into `QUEST_END_SCRIPTS` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) values('308','62','0','0','0','2000000079','0','0','0','0');
|
||||
|
||||
|
||||
@@ -460,6 +460,7 @@ void GameObject::Update(uint32 /*p_time*/)
|
||||
if(!m_spawnedByDefault)
|
||||
{
|
||||
m_respawnTime = 0;
|
||||
ObjectAccessor::UpdateObjectVisibility(this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -634,18 +635,18 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
|
||||
if (!Create(guid,entry, map, phaseMask, x, y, z, ang, rotation0, rotation1, rotation2, rotation3, animprogress, go_state, ArtKit) )
|
||||
return false;
|
||||
|
||||
if(!GetGOInfo()->GetDespawnPossibility() && !GetGOInfo()->IsDespawnAtAction())
|
||||
if(data->spawntimesecs >= 0)
|
||||
{
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
|
||||
m_spawnedByDefault = true;
|
||||
m_respawnDelayTime = 0;
|
||||
m_respawnTime = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(data->spawntimesecs >= 0)
|
||||
|
||||
if(!GetGOInfo()->GetDespawnPossibility() && !GetGOInfo()->IsDespawnAtAction())
|
||||
{
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
|
||||
m_respawnDelayTime = 0;
|
||||
m_respawnTime = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_spawnedByDefault = true;
|
||||
m_respawnDelayTime = data->spawntimesecs;
|
||||
m_respawnTime = objmgr.GetGORespawnTime(m_DBTableGuid, map->GetInstanceId());
|
||||
|
||||
@@ -656,12 +657,12 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
|
||||
objmgr.SaveGORespawnTime(m_DBTableGuid,GetInstanceId(),0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_spawnedByDefault = false;
|
||||
m_respawnDelayTime = -data->spawntimesecs;
|
||||
m_respawnTime = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_spawnedByDefault = false;
|
||||
m_respawnDelayTime = -data->spawntimesecs;
|
||||
m_respawnTime = 0;
|
||||
}
|
||||
|
||||
m_goData = data;
|
||||
|
||||
Reference in New Issue
Block a user