Channel Changer [PROBLEM]

12/16/2017 12:05 Waaaasgeht#1
Moin epvp
Ich habe bei mir den Channel Changer eingebaut
das Problem ist dass wenn ich mich porte kommt "du hast den Channel erfolgreich gewechselt" aber es passiert nichts
ich habe bei mir 2 Channels mit 5 Cores eingebaut:

Channel: 1/core_1 13001

Channel: 1/core_2 13002

Channel: 1/core_3 13003

Channel: 1/core_4 13004

Channel: 1/core_5 13005



Channel: 2/core_1 13101

Channel: 2/core_2 13102

Channel: 2/core_3 13103

Channel: 2/core_4 13104

Channel: 2/core_5 13105

und hier ist der Code:

Code:
    for(int i = 0; i < 2; i++){
       for(int i2 = 1; i2 < 9; i2++){
           ch[13*1000 + i*100 + i2] = i+1;
was genau muss ich da jetzt anpassen ? ich kapier das nicht...
hoffe ihr könnt mir helfen

edit: wenn mir das jemand löst
kriegt ne 10€ psc (offline psc und aus de)
12/17/2017 14:14 Waaaasgeht#2
#push

edit: wenn mir das jemand löst
kriegt ne 10€ psc (offline psc und aus de)
12/18/2017 16:50 DevBlade#3
Teste es mal so:

Code:
 void CHARACTER::ChannelSwitch(int iNewChannel)
{

    long lAddr;
    long lMapIndex;
    WORD wPort;
    long x = this->GetX();
    long y = this->GetY();

    if (!CMapLocation::instance().Get(x, y, lMapIndex, lAddr, wPort))
    {
        return;
    }

    if(lMapIndex >= 10000){
        return;
    }
	
	if (IsHack ())
		return;

    std::map<WORD, int>ch;

	for(int i = 0; i < 4; i++)
	{
		for(int i2 = 0; i < 2; i++)
		{
			ch[(13 * 1000) + (i * 3000) + i2] = i + 1;
			if (i == 3)
				ch[(13 * 1000) + ((i * 3000) - 1000) + i2] = i + 1;
		}
	}
   
   int chan;
   if(ch.find(wPort) != ch.end())
   {
       chan = ch[wPort];
   }
   else
   {
        return;
   }
   Stop();
   Save();

   if(GetSectree())
   {
       GetSectree()->RemoveEntity(this);
        ViewCleanup();

        EncodeRemovePacket(this);
    }

    TPacketGCWarp p;
    p.bHeader    = HEADER_GC_WARP;
    p.lX    = x;
    p.lY    = y;
    p.lAddr    = lAddr;
    p.wPort    = (wPort - 3000*(chan-1) + 3000*(iNewChannel-1));

	ChatPacket(CHAT_TYPE_COMMAND, "Update %d",iNewChannel);
    GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
}
12/18/2017 18:52 Waaaasgeht#4
Quote:
Originally Posted by DevBlade View Post
Teste es mal so:

Code:
 void CHARACTER::ChannelSwitch(int iNewChannel)
{

    long lAddr;
    long lMapIndex;
    WORD wPort;
    long x = this->GetX();
    long y = this->GetY();

    if (!CMapLocation::instance().Get(x, y, lMapIndex, lAddr, wPort))
    {
        return;
    }

    if(lMapIndex >= 10000){
        return;
    }
	
	if (IsHack ())
		return;

    std::map<WORD, int>ch;

	for(int i = 0; i < 4; i++)
	{
		for(int i2 = 0; i < 2; i++)
		{
			ch[(13 * 1000) + (i * 3000) + i2] = i + 1;
			if (i == 3)
				ch[(13 * 1000) + ((i * 3000) - 1000) + i2] = i + 1;
		}
	}
   
   int chan;
   if(ch.find(wPort) != ch.end())
   {
       chan = ch[wPort];
   }
   else
   {
        return;
   }
   Stop();
   Save();

   if(GetSectree())
   {
       GetSectree()->RemoveEntity(this);
        ViewCleanup();

        EncodeRemovePacket(this);
    }

    TPacketGCWarp p;
    p.bHeader    = HEADER_GC_WARP;
    p.lX    = x;
    p.lY    = y;
    p.lAddr    = lAddr;
    p.wPort    = (wPort - 3000*(chan-1) + 3000*(iNewChannel-1));

	ChatPacket(CHAT_TYPE_COMMAND, "Update %d",iNewChannel);
    GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
}
danke für dein kommentar
aber es kommt wieder "du hast den channel erfolgreich gewechselt" und passiert nichts

edit: wenn ich in ch1 bin und dann change kommt du hast den channel erfolgreich gewechselt passiert nichts aber sobald ich mich auf eine andere map warpe steht oben rechts ch2 aber in wirklich bin ich immer noch in ch1
12/20/2017 11:30 Waaaasgeht#5
#push
12/22/2017 11:21 Waaaasgeht#6
erledigt
#closerequest