get the name of the player who spawned this npc with soulstone

This commit is contained in:
1whohears committed 2022-05-28 23:40:01 -05:00
1 parent b7ad0ce29b
commit 9fef65b194
4 files changed
+26 -2

No files matched your search

@@ -78,7 +78,7 @@ public class ItemSoulstoneFilled extends Item {
npc.ai.startPos = new int[]{x, y, z};
npc.setHealth(npc.getMaxHealth());
npc.setPosition((float)x + 0.5F, npc.getStartYPos(), (float)z + 0.5F);
npc.advanced.soulStonePlayerName = player.getDisplayName();
if(npc.advanced.role == EnumRoleType.Companion && player != null){
PlayerData data = PlayerDataController.instance.getPlayerData(player);
if(data.hasCompanion())