Exemplo n.º 1
0
        public static void sendMessage(ICollection<Player> receiverPlayers, AreaEffect areaEffect)
        {
            if (receiverPlayers != null && receiverPlayers.Count != 0)
            {
                RawMessage msg = new RawMessage();
                msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GAddAreaEffect)));

                msg.putInt("iid", areaEffect.instanceId);
                msg.putInt("tid", TypeIdGenerator.getAreaEffectId(areaEffect.GetType()));
                msg.putInt("uid", areaEffect.ownerPlayer.user.id);

                Vector3 position = areaEffect.getWorldPosition();
                msg.putFloatArray("pos", new float[] { position.x, position.y, position.z });

                foreach (var receiverPlayer in receiverPlayers)
                    receiverPlayer.user.session.client.SendMessage(msg);
            }
        }
Exemplo n.º 2
0
        public void addAreaEffect(AreaEffect areaEffect)
        {
            areaEffects.Add( areaEffect.instanceId, areaEffect);

            // removeAreaEffect fonksiyonu gereksiz cunku areaEffect.destroyable==true oldugu zaman oyun bu areaEffect'i zaten silecek.
        }