public void Add(BaseGameRoom room, int spellIndex, int parentIndex, float[] spawnPos, float[] targetPos, float[] rot, int hp, string nickname) { int caster = -1; for (int i = 0; i < room.PlayersCount; i++) { if (room.playersTCP[i].nickname.Equals(nickname)) { caster = i; break; } } int index = Add(room, hp, spawnPos, rot, caster); SendDataTCP.SendInstantiate(room, spellIndex, index, parentIndex, spawnPos, targetPos, rot, hp, nickname); }