示例#1
0
        public static void SpawnEffectFor(Player p, string effectName, float x, float y, float z, float originX, float originY, float originZ)
        {
            EffectConfig effect;

            if (!effectAtEffectName.TryGetValue(effectName, out effect))
            {
                p.Message("%WCould not find effect named \"{0}\" !", effectName);
                return;
            }
            if (!p.Supports(CpeExt.CustomParticles))
            {
                return;
            }
            p.Send(Packet.SpawnEffect(effect.ID, x, y - effect.offset, z, originX, originY - effect.offset, originZ));
        }
示例#2
0
        public static void SpawnEffectAt(Level lvl, string effectName, float x, float y, float z, float originX, float originY, float originZ, Player notShownTo = null)
        {
            EffectConfig effect;

            if (!effectAtEffectName.TryGetValue(effectName, out effect))
            {
                Logger.Log(LogType.Warning, "GoodlyEffects: Could not find effect named \"{0}\" !", effectName);
                return;
            }
            Player[] players = PlayerInfo.Online.Items;
            foreach (Player p in players)
            {
                if (p.level != lvl || !p.Supports(CpeExt.CustomParticles) || p == notShownTo)
                {
                    continue;
                }
                p.Send(Packet.SpawnEffect(effect.ID, x, y - effect.offset, z, originX, originY - effect.offset, originZ));
            }
        }