Map problem.

04/07/2010 05:25 Arcо#1
Well after about a week of messing with this problem, I can't seem to fix it.
Okay well say your in the promotion center. On your map, you'll be able to see people that are inside lotto and pka. Same for those 2 maps. Anyone know what the problem could be?
04/07/2010 08:14 -NewDawn-#2
Quote:
Originally Posted by Ginger112 View Post
ya, go find the golden arrow
Be quiet Decker.

@Arco, I know- I have the same problem. I looked over it and I couldn't figure it out. It happens with the Offline TG and Furniture Store too if that helps find any patterns.
04/07/2010 09:11 Paralyzer[GM]#3
The map that the lotto and pka is on are THE SAME just duplicate the original maps just change the maps around :D
04/07/2010 09:12 Arcо#4
Quote:
Originally Posted by Paralyzer[GM] View Post
The map that the lotto and pka is on are THE SAME just duplicate the original maps just change the maps around :D
Then explain why I have the same problem with people in the 2nd rb map and pka.
04/07/2010 10:44 ChingChong23#5
what source are you using? and does it happen with the original version of the source, or just something you've modified?
04/07/2010 10:52 Arcо#6
Quote:
Originally Posted by ChingChong23 View Post
what source are you using? and does it happen with the original version of the source, or just something you've modified?
5165 Lotf and it happens with the original version too.
04/07/2010 12:37 PeTe Ninja#7
its because most likely (imo) you are using a duplicate map but your "SpawnOthersToMe" or "SpawnMeToOthers" only tells them to look on the map instead of the dmap.. So try making it check the dynamic maps instead of normal maps and then make it view whos there.
04/07/2010 14:43 kamote#8
Quote:
Originally Posted by PeTe Ninja View Post
its because most likely (imo) you are using a duplicate map but your "SpawnOthersToMe" or "SpawnMeToOthers" only tells them to look on the map instead of the dmap.. So try making it check the dynamic maps instead of normal maps and then make it view whos there.
are you telling that the bug is in the Spawns method under World.cs? and you are referring that the solution can be solve by altering this line of codes?
Code:
foreach (Character CC in H_Chars.Values)
                {
                    if (CC != C && CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 17) && !MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check)
                    {
                        C.MyClient.AddSend(Packets.SpawnEntity(CC));
                        if (CC.MyGuild != null)
                            C.MyClient.AddSend(Packets.String(CC.MyGuild.GuildID, (byte)StringType.GuildName, CC.MyGuild.GuildName));

                        CC.MyClient.AddSend(CSpawn);
                        if (C.MyGuild != null)
                            CC.MyClient.AddSend(Packets.String(C.MyGuild.GuildID, (byte)StringType.GuildName, C.MyGuild.GuildName));
                    }
                }
04/07/2010 14:52 PeTe Ninja#9
Quote:
Originally Posted by kamote View Post
are you telling that the bug is in the Spawns method under World.cs? and you are referring that the solution can be solve by altering this line of codes?
Code:
foreach (Character CC in H_Chars.Values)
                {
                    if (CC != C && CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 17) && !MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check)
                    {
                        C.MyClient.AddSend(Packets.SpawnEntity(CC));
                        if (CC.MyGuild != null)
                            C.MyClient.AddSend(Packets.String(CC.MyGuild.GuildID, (byte)StringType.GuildName, CC.MyGuild.GuildName));

                        CC.MyClient.AddSend(CSpawn);
                        if (C.MyGuild != null)
                            CC.MyClient.AddSend(Packets.String(C.MyGuild.GuildID, (byte)StringType.GuildName, C.MyGuild.GuildName));
                    }
                }
yes possibly..
04/07/2010 15:33 zTREME#10
Para
The maps aren't the same.
Promotioncenter is forum.
Lucky is mapid 700
04/07/2010 20:23 teroareboss1#11
in World.cs

replace
public static void Spawns(Character C, bool Check)

with
Quote:
public static void Spawns(Character C, bool Check)
{
try
{
COPacket CSpawn = Packets.SpawnEntity(C);
foreach (Character CC in H_Chars.Values)
{
if (CC != C && CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 17) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check))
{
C.MyClient.AddSend(Packets.SpawnEntity(CC));
if (CC.MyGuild != null)
C.MyClient.AddSend(Packets.String(CC.MyGuild.Guild ID, (byte)StringType.GuildName, CC.MyGuild.GuildName));

CC.MyClient.AddSend(CSpawn);
if (C.MyGuild != null)
CC.MyClient.AddSend(Packets.String(C.MyGuild.Guild ID, (byte)StringType.GuildName, C.MyGuild.GuildName));
}
}
Hashtable MapMobs = (Hashtable)H_Mobs[C.Loc.Map];
if (MapMobs != null)
{
foreach (Mob M in MapMobs.Values)
if (M.Alive && MyMath.InBox(C.Loc.X, C.Loc.Y, M.Loc.X, M.Loc.Y, 16) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, M.Loc.X, M.Loc.Y, 16) || !Check))
C.MyClient.AddSend(Packets.SpawnEntity(M));
}
Hashtable MapItems = (Hashtable)H_Items[C.Loc.Map];
if (MapItems != null)
{
foreach (DroppedItem DI in MapItems.Values)
if (MyMath.InBox(C.Loc.X, C.Loc.Y, DI.Loc.X, DI.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, DI.Loc.X, DI.Loc.Y, 14) || !Check))
C.MyClient.AddSend(Packets.ItemDrop(DI));
}
foreach (NPC N in H_NPCs.Values)
if (N.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, N.Loc.X, N.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, N.Loc.X, N.Loc.Y, 14) || !Check))
{
if (N.MaxHP == 0)
C.MyClient.AddSend(Packets.SpawnNPC(N));
else
C.MyClient.AddSend(Packets.SpawnNPCWithHP(N));
}

foreach (Features.PersonalShops.Shop S in H_PShops.Values)
if (S.NPCInfo.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, S.NPCInfo.Loc.X, S.NPCInfo.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, S.NPCInfo.Loc.X, S.NPCInfo.Loc.Y, 14) || !Check))
{
C.MyClient.AddSend(Packets.SpawnNamedNPC(S.NPCInfo , S.Name));
if (S.Hawk != "")
C.MyClient.AddSend(Packets.ChatMessage(26514, S.Owner.Name, "ALL", S.Hawk, 2104, 0));
}
foreach (Companion Cmp in H_Companions.Values)
if (Cmp.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, Cmp.Loc.X, Cmp.Loc.Y, 16) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, Cmp.Loc.X, Cmp.Loc.Y, 16) || !Check))
C.MyClient.AddSend(Packets.SpawnEntity(Cmp));
Features.GuildWars.ThePole.Spawn(C, Check);
Features.GuildWars.TheLeftGate.Spawn(C, Check);
Features.GuildWars.TheRightGate.Spawn(C, Check);
}
catch { }
}
04/07/2010 20:37 PeTe Ninja#12
lets see if hes right.. someone check. :)
04/07/2010 21:18 HardNotTo#13
only time I've seen this start was when someone creates a House
04/08/2010 06:41 -NewDawn-#14
Idk if it's right but it makes sense to me- plus i'm really busy coding since the crash...
can someone just double check it?
04/08/2010 22:52 ktamer#15
Just tried it out. So far looks like it works! Of course there's the small issue in the code where GUILD ID should be GUILDID but that seems it for now. Anyone else try it out?