Quote:
Originally Posted by keving
Make an foreach for all Chars and simple send the effect for all to you 
If you dont understand dont ask me pls 
|
You'd probably want to do it just on the map or close by you, otherwise if you have a ton of people doing effects, it will lagg people who are tons of maps away, because it is sending the packets for the effects.. but they don't even need to see them.(Correct me If I'm wrong, I don't know much about the coding of Conquer D=<)
Edit: Here's the code ... I shortened it a bit ..
Code:
if (Action == 230)//Cool Effect
{
string TheEquip = Equips[3];
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
int ClassType = (int)Job;
string EfTy = "";
if (Other.ItemQuality(ItemId) == 9)
{
if (Job >= 10 && Job <= 15)
{
EfTy = "warrior-s";
}
if (Job >= 40 && Job <= 45)
{
EfTy = "archer-s";
}
if (Job >= 20 && Job <= 25)
{
EfTy = "figher-s";
}
if (Job >= 132 && Job <=145 || Job == 100 || Job == 101)
{
EfTy = "taoist-s";
}
foreach (DictionaryEntry DE in World.AllChars)
{
Character Charr = (Character)DE.Value;
if (Charr.LocMap == LocMap)
{
MyClient.SendPacket(General.MyPackets.String(UID, 10, EfTy));
}
}
Action = 100;
}
}
Probably something a tad bit wrong with that. Anyone can correct me.. Don't have a server to test on, and too lazy to set up one to test it out right now.