fix(SpellEffects): GameObject Rotation (#24850)

This commit is contained in:
天鹭
2026-02-25 15:18:12 +08:00
committed by GitHub
parent 3cb5c9685f
commit bb10c2c541
3 changed files with 14 additions and 7 deletions

View File

@@ -117,7 +117,8 @@ public:
GameObject* object = sObjectMgr->IsGameObjectStaticTransport(objectInfo->entry) ? new StaticTransport() : new GameObject();
ObjectGuid::LowType guidLow = map->GenerateLowGuid<HighGuid::GameObject>();
if (!object->Create(guidLow, objectInfo->entry, map, player->GetPhaseMaskForSpawn(), x, y, z, o, G3D::Quat(), 0, GO_STATE_READY))
G3D::Quat rotation = G3D::Quat::fromAxisAngleRotation(G3D::Vector3::unitZ(), o);
if (!object->Create(guidLow, objectInfo->entry, map, player->GetPhaseMaskForSpawn(), x, y, z, o, rotation, 0, GO_STATE_READY))
{
delete object;
return false;