diff --git a/data/sql/updates/pending_db_world/rev_1528849180165830100.sql b/data/sql/updates/pending_db_world/rev_1528849180165830100.sql new file mode 100644 index 000000000..a56fd6763 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1528849180165830100.sql @@ -0,0 +1,21 @@ +INSERT INTO version_db_world (`sql_rev`) VALUES ('1528849180165830100'); + + +-- proper coords: +-- 3465.16, -3940.45, 308.788, 0.441179, -0.305481, 0.637715, 0.305481, 0.637716, +-- requires two guids, one for the 'visual effect' and one for the +-- teleporter gameobject itself + +-- teleporter itself +UPDATE `gameobject` SET + `spawnmask` = 3, `phasemask`= 1, + `position_x` = 3465.16, `position_y` = -3940.45, `position_z` = 308.788,`orientation` = 0.441179, + `rotation0` = -0.305481, `rotation1` = 0.637715, `rotation2` = 0.305481, `rotation3` = 0.637716 + where `guid` = 65857; -- check if guid is valid + +-- visual effect +UPDATE `gameobject` SET + `spawnmask` = 3, `phasemask`= 2, + `position_x` = 3465.16, `position_y` = -3940.45, `position_z` = 308.788,`orientation` = 0.441179, + `rotation0` = -0.305481, `rotation1` = 0.637715, `rotation2` = 0.305481, `rotation3` = 0.637716 + WHERE `guid` = 268045; -- check if guid is valid diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 102986cc1..c1596c945 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -262,12 +262,26 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa } GameObjectAddon const* addon = sObjectMgr->GetGameObjectAddon(guidlow); - // xinef: hackfix - but make it possible to use original WorldRotation (using special gameobject addon data) - // pussywizard: temporarily calculate WorldRotation from orientation, do so until values in db are correct - if (addon && addon->invisibilityType == INVISIBILITY_GENERAL && addon->InvisibilityValue == 0) - SetWorldRotation(rotation); - else - SetWorldRotationAngles(NormalizeOrientation(GetOrientation()), 0.0f, 0.0f); + + // hackfix for the hackfix down below + switch (goinfo->entry) + { + // excluded ids from the hackfix below + // used switch since there should be more + case 181233: // maexxna portal effect + case 181575: // maexxna portal + SetWorldRotation(rotation); + break; + default: + // xinef: hackfix - but make it possible to use original WorldRotation (using special gameobject addon data) + // pussywizard: temporarily calculate WorldRotation from orientation, do so until values in db are correct + if (addon && addon->invisibilityType == INVISIBILITY_GENERAL && addon->InvisibilityValue == 0) + SetWorldRotation(rotation); + else + SetWorldRotationAngles(NormalizeOrientation(GetOrientation()), 0.0f, 0.0f); + break; + } + // pussywizard: no PathRotation for normal gameobjects SetTransportPathRotation(0.0f, 0.0f, 0.0f, 1.0f);