summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-08-03 22:03:48 +0200
committermadmaxoft <github@xoft.cz>2014-08-03 22:04:52 +0200
commit3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3 (patch)
tree1af0928bd5e51e38c459aca0e60c8ae4f1ea21fe /src/WorldStorage/NBTChunkSerializer.cpp
parentDebuggers: Added a Name-from-UUID cMojangAPI test. (diff)
downloadcuberite-3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3.tar
cuberite-3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3.tar.gz
cuberite-3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3.tar.bz2
cuberite-3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3.tar.lz
cuberite-3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3.tar.xz
cuberite-3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3.tar.zst
cuberite-3136fc6246a6e0c3ab19eb3dddb1badc7c427ee3.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 601cd8833..ecda9b8fd 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -569,10 +569,12 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
}
case cMonster::mtWolf:
{
- m_Writer.AddString("Owner", ((const cWolf *)a_Monster)->GetOwner());
- m_Writer.AddByte("Sitting", (((const cWolf *)a_Monster)->IsSitting() ? 1 : 0));
- m_Writer.AddByte("Angry", (((const cWolf *)a_Monster)->IsAngry() ? 1 : 0));
- m_Writer.AddInt("CollarColor", ((const cWolf *)a_Monster)->GetCollarColor());
+ const cWolf & Wolf = *((cWolf *)a_Monster);
+ m_Writer.AddString("Owner", Wolf.GetOwnerName());
+ m_Writer.AddString("OwnerUUID", Wolf.GetOwnerUUID());
+ m_Writer.AddByte("Sitting", Wolf.IsSitting() ? 1 : 0);
+ m_Writer.AddByte("Angry", Wolf.IsAngry() ? 1 : 0);
+ m_Writer.AddInt("CollarColor", Wolf.GetCollarColor());
break;
}
case cMonster::mtZombie: