Esempio n. 1
0
        public void SpawnActorForPlayer(int inPlayerId, byte worldId)
        {
            SActor actor = (SActor)GameObjectRegistry.sInstance.CreateGameObject((uint32_t)GameObjectClassId.kActor, worldId);

            actor.SetColor(GameMode.sInstance.GetEntry((uint32_t)inPlayerId).GetColor());
            actor.SetPlayerId((uint32_t)inPlayerId);
            actor.Possess(inPlayerId);
            actor.SetWorldId(worldId);
            //gotta pick a better spawn location than this...
            actor.SetLocation(core.Utility.GetRandomVector(-10, 10, 0));

            Log.Information(string.Format("SpawnActorForPlayer player_id{0}, world{1}", inPlayerId, worldId));
        }