RegisterActor() 공개 메소드

public RegisterActor ( Actor nActor ) : bool
nActor SagaDB.Actors.Actor
리턴 bool
예제 #1
0
파일: Map.cs 프로젝트: zNext666/SagaECO
        public void SendActorToMap(Actor mActor, Map newMap, short x, short y)
        {
            // todo: add support for multiple map servers

            // obtain the new map
            byte mapid = (byte)newMap.id;

            if (mapid == mActor.MapID)
            {
                TeleportActor(mActor, x, y);
                return;
            }

            // delete the actor from this map
            this.DeleteActor(mActor);

            // update the actor
            mActor.MapID = mapid;
            mActor.X     = x;
            mActor.Y     = y;

            // register the actor in the new map
            if (mActor.type != ActorType.PC)
            {
                newMap.RegisterActor(mActor);
            }
            else
            {
                newMap.RegisterActor(mActor, mActor.ActorID);
            }
        }
예제 #2
0
파일: Map.cs 프로젝트: x3sphiorx/SagaRO2
        public void SendActorToMap(Actor mActor, Map newMap, float x, float y, float z)
        {
            // todo: add support for multiple map servers

            // obtain the new map
            byte mapid = (byte)newMap.id;

            if (mapid == mActor.mapID)
            {
                TeleportActor(mActor, x, y, z);
                return;
            }

            // delete the actor from this map
            this.DeleteActor(mActor);

            // update the actor
            mActor.mapID = mapid;
            mActor.x     = x;
            mActor.y     = y;
            mActor.z     = z;
            ActorEventHandlers.PC_EventHandler eh = (SagaMap.ActorEventHandlers.PC_EventHandler)mActor.e;
            eh.C.map = newMap;

            // register the actor in the new map
            if (mActor.type != ActorType.PC)
            {
                newMap.RegisterActor(mActor);
            }
            else
            {
                newMap.RegisterActor(mActor, mActor.id);
            }
        }
예제 #3
0
파일: Map.cs 프로젝트: yasuhiro91/SagaECO
        public void SendActorToMap(Actor mActor, Map newMap, short x, short y)
        {
            // todo: add support for multiple map servers

            // obtain the new map
            byte mapid = (byte)newMap.id;
            if (mapid == mActor.MapID)
            {
                TeleportActor(mActor, x, y);
                return;
            }

            // delete the actor from this map
            this.DeleteActor(mActor);

            // update the actor
            mActor.MapID = mapid;
            mActor.X = x;
            mActor.Y = y;

            // register the actor in the new map
            if (mActor.type != ActorType.PC)
            {
                newMap.RegisterActor(mActor);
            }
            else
            {
                newMap.RegisterActor(mActor, mActor.ActorID);
            }
        }
예제 #4
0
파일: Map.cs 프로젝트: Willyham/SagaRO2
        public void SendActorToMap(Actor mActor, Map newMap, float x, float y, float z)
        {
            // todo: add support for multiple map servers

            // obtain the new map
            byte mapid = (byte)newMap.id;
            if (mapid == mActor.mapID)
            {
                TeleportActor(mActor, x, y, z);
                return;
            }

            // delete the actor from this map
            this.DeleteActor(mActor);

            // update the actor
            mActor.mapID = mapid;
            mActor.x = x;
            mActor.y = y;
            mActor.z = z;
            ActorEventHandlers.PC_EventHandler eh = (SagaMap.ActorEventHandlers.PC_EventHandler)mActor.e;
            eh.C.map = newMap;

            // register the actor in the new map
            if (mActor.type != ActorType.PC)
            {
                newMap.RegisterActor(mActor);
            }
            else
            {
                newMap.RegisterActor(mActor, mActor.id);
            }
        }