Skip to content

Commit

Permalink
[Data] Added doodads for quest From Dust to Dust ( 3644 ) (AAEmu#1021)
Browse files Browse the repository at this point in the history
- Added some of the missing ``Savannah Elephant Bone ( 3875 )`` doodads to be able to complete the quest ``From Dust to Dust ( 3644 )``
- Updated the ``/write`` GM command to clamp the rotation values.
  • Loading branch information
ZeromusXYZ committed Jul 14, 2024
1 parent 9afcf05 commit 56886d3
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 9 deletions.
130 changes: 130 additions & 0 deletions AAEmu.Game/Data/Worlds/main_world/doodad_spawns.json
Original file line number Diff line number Diff line change
Expand Up @@ -387721,5 +387721,135 @@
"Y": 8111.0,
"Z": 468.15
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25809.918,
"Y": 6509.937,
"Z": 373.6,
"Yaw": -51
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25808.766,
"Y": 6511.7847,
"Z": 373.1953,
"Yaw": 75
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25802.533,
"Y": 6415.084,
"Z": 381.5757,
"Yaw": -60
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25842.844,
"Y": 6338.2026,
"Z": 401.5,
"Yaw": 55
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25917.55,
"Y": 6434.5,
"Z": 389.9,
"Yaw": 160
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25954.682,
"Y": 6479.6846,
"Z": 383.0,
"Yaw": -38
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25943.467,
"Y": 6506.001,
"Z": 380.0,
"Yaw": 80
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25942.34,
"Y": 6513.0947,
"Z": 379.3,
"Yaw": -6
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25964.723,
"Y": 6480.1787,
"Z": 382.0588,
"Yaw": 48
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25978.047,
"Y": 6488.345,
"Z": 380.5002,
"Yaw": 134
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25984.793,
"Y": 6508.64,
"Z": 378.3,
"Yaw": 55
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25971.186,
"Y": 6519.119,
"Z": 379.0,
"Yaw": 116.5
}
},
{
"UnitId": 3875,
"Title": "Savannah Elephant Bone",
"Position": {
"X": 25893.656,
"Y": 6526.2397,
"Z": 375.3,
"Yaw": 75
}
}
]
18 changes: 9 additions & 9 deletions AAEmu.Game/Scripts/Commands/Nwrite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public void Execute(Character character, string[] args, IMessageOutput messageOu
pos.X = doodad.Transform.World.Position.X;
pos.Y = doodad.Transform.World.Position.Y;
pos.Z = doodad.Transform.World.Position.Z;
pos.Roll = doodad.Transform.Local.Rotation.X.RadToDeg();
pos.Pitch = doodad.Transform.Local.Rotation.Y.RadToDeg();
pos.Yaw = doodad.Transform.Local.Rotation.Z.RadToDeg();
pos.Roll = (float)MathUtil.ClampDegAngle(doodad.Transform.Local.Rotation.X.RadToDeg());
pos.Pitch = (float)MathUtil.ClampDegAngle(doodad.Transform.Local.Rotation.Y.RadToDeg());
pos.Yaw = (float)MathUtil.ClampDegAngle(doodad.Transform.Local.Rotation.Z.RadToDeg());

var newEntry = new JsonDoodadSpawns();
newEntry.Id = newId;
Expand All @@ -113,9 +113,9 @@ public void Execute(Character character, string[] args, IMessageOutput messageOu
spawner.Position.X = doodad.Transform.World.Position.X;
spawner.Position.Y = doodad.Transform.World.Position.Y;
spawner.Position.Z = doodad.Transform.World.Position.Z;
spawner.Position.Roll = doodad.Transform.Local.Rotation.X.RadToDeg();
spawner.Position.Pitch = doodad.Transform.Local.Rotation.Y.RadToDeg();
spawner.Position.Yaw = doodad.Transform.Local.Rotation.Z.RadToDeg();
spawner.Position.Roll = (float)MathUtil.ClampDegAngle(doodad.Transform.Local.Rotation.X.RadToDeg());
spawner.Position.Pitch = (float)MathUtil.ClampDegAngle(doodad.Transform.Local.Rotation.Y.RadToDeg());
spawner.Position.Yaw = (float)MathUtil.ClampDegAngle(doodad.Transform.Local.Rotation.Z.RadToDeg());
break;
}
}
Expand Down Expand Up @@ -179,15 +179,15 @@ public void Execute(Character character, string[] args, IMessageOutput messageOu
newEntry.Position.X = pos.Position.X;
newEntry.Position.Y = pos.Position.Y;
newEntry.Position.Z = pos.Position.Z;
newEntry.Position.Yaw = pos.Rotation.Z.RadToDeg();
newEntry.Position.Yaw = (float)MathUtil.ClampDegAngle(pos.Rotation.Z.RadToDeg());
//var (rx, ry, rz) = pos.ToRollPitchYawSBytesMovement();
//newEntry.Position.RotationX = rx;
//newEntry.Position.RotationY = ry;
//newEntry.Position.RotationZ = rz;
//newEntry.Scale = npcs[i].Scale; // 0.0 and 1.0 seem to do the same thing
spawners.Add(newEntry);

npcs[i].Spawner.Id = newId; //Set ID incase you edit it after adding!
npcs[i].Spawner.Id = newId; //Set ID in-case you edit it after adding!
}
else
{
Expand All @@ -200,7 +200,7 @@ public void Execute(Character character, string[] args, IMessageOutput messageOu
spawner.Position.X = pos.Position.X;
spawner.Position.Y = pos.Position.Y;
spawner.Position.Z = pos.Position.Z;
spawner.Position.Yaw = pos.Rotation.Z.RadToDeg();
spawner.Position.Yaw = (float)MathUtil.ClampDegAngle(pos.Rotation.Z.RadToDeg());
//var (rx, ry, rz) = pos.ToRollPitchYawSBytesMovement();
//spawner.Position.RotationX = rx;
//spawner.Position.RotationY = ry;
Expand Down

0 comments on commit 56886d3

Please sign in to comment.