[Dev Rev 81.360] GM Command bug /hide

Put your bugs you find in osRose here

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: [Dev Rev 81.360] GM Command bug /hide

Postby amaedict on Mon Nov 09, 2009 10:03 am

nope.

still doesn't work.
We Have it all ... Image
Image
User avatar
amaedict
Clown
Clown
 
Posts: 531
Joined: Thu Apr 23, 2009 2:44 pm

Re: [Dev Rev 81.360] GM Command bug /hide

Postby lmame on Mon Nov 09, 2009 10:07 am

Do you have some message in worldserver window?
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev 81.360] GM Command bug /hide

Postby lmame on Mon Nov 09, 2009 10:35 am

Ok my bad I made a typo:

REPLACE:
  1.  
  2.  
  3.     if(Shop->open)
  4.     {
  5.         ADDBYTE( pak, 0x02 );
  6.     }
  7.     else if(otherclient->is_invisible&&!player->is_invisible)
  8.     {
  9.         Log(MSG_INFO,"Player %s should be invisible to %s",otherclient->CharInfo->charname,player->CharInfo->charname);
  10.         ADDBYTE( pak, 0x01 );
  11.     }
  12.     else if(otherclient->is_invisible&&player->is_invisible)
  13.     {
  14.         //2 GMs together in hiding, just for the logs...
  15.         Log(MSG_INFO,"Player %s and %s are both invisible but should see each other.",otherclient->CharInfo->charname,player->CharInfo->charname);
  16.         ADDBYTE( pak, 0x00 );
  17.     }
  18.     else
  19.     {
  20.         ADDBYTE( pak, 0x00 );
  21.     }
  22.  



BY:
  1.  
  2.     if(Shop->open)
  3.     {
  4.         ADDBYTE( pak, 0x02 );
  5.     }
  6.     else if(otherclient->isInvisibleMode&&!player->isInvisibleMode)
  7.     {
  8.         Log(MSG_INFO,"Player %s should be invisible to %s",otherclient->CharInfo->charname,player->CharInfo->charname);
  9.         ADDBYTE( pak, 0x01 );
  10.     }
  11.     else if(otherclient->isInvisibleMode&&player->isInvisibleMode)
  12.     {
  13.         //2 GMs together in hiding, just for the logs...
  14.         Log(MSG_INFO,"Player %s and %s are both invisible but should see each other.",otherclient->CharInfo->charname,player->CharInfo->charname);
  15.         ADDBYTE( pak, 0x00 );
  16.     }
  17.     else
  18.     {
  19.         ADDBYTE( pak, 0x00 );
  20.     }
  21.  
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev 81.360] GM Command bug /hide

Postby amaedict on Mon Nov 09, 2009 1:08 pm

works now thnx. :)
We Have it all ... Image
Image
User avatar
amaedict
Clown
Clown
 
Posts: 531
Joined: Thu Apr 23, 2009 2:44 pm

Re: [Dev Rev 81.360] GM Command bug /hide

Postby lmame on Mon Nov 09, 2009 1:22 pm

Ok :)

Edit:
Forgot to say it but credits for the 0x01 findings to Maxxon ;)
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev 81.360] GM Command bug /hide

Postby amaedict on Mon Nov 09, 2009 3:13 pm

just a little side request.

in future maybe if possible make buffs invisible too when character is invisible. Currently,after using the /hide command, if you use gm buffs and buff yourself other players cant see you, but they can see the buffs on you.

Also, now that you have the /hide working, shouldnt the same concept work for the hakwer camoflage skill that is currently bugged ?
We Have it all ... Image
Image
User avatar
amaedict
Clown
Clown
 
Posts: 531
Joined: Thu Apr 23, 2009 2:44 pm

Re: [Dev Rev 81.360] GM Command bug /hide

Postby lmame on Mon Nov 09, 2009 3:44 pm

amaedict wrote:just a little side request.
in future maybe if possible make buffs invisible too when character is invisible. Currently,after using the /hide command, if you use gm buffs and buff yourself other players cant see you, but they can see the buffs on you.

You can do that yourself quite easily, don't send the effects packets for skills if the player is invisible, something like:

REPLACE In "charfunctions.cpp"::
  1.  
  2.     //if (getClient()==NULL)
  3.        GServer->SendToVisible( &pak, this );
  4.     /*else
  5.         getClient();*/


BY:
  1.  
  2.     if(IsPlayer())
  3.     {
  4.         CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  5.         if(!testplayer->isInvisibleMode)
  6.         {
  7.             //if (getClient()==NULL)
  8.                GServer->SendToVisible( &pak, this );
  9.             /*else
  10.                 getClient();*/
  11.         }
  12.         else
  13.         {
  14.             testplayer->client->SendPacket(&pak);
  15.         }
  16.  
  17.     }
  18.     else
  19.     {
  20.         GServer->SendToVisible( &pak, this );
  21.     }


This way it should only send the skill packets to himself if the guy is invisible but you need to do it too in battle.cpp, for example:
REPLACE:
  1. // use buff skill
  2. void CCharacter::UseBuffSkill( CCharacter* Target, CSkills* skill )
  3. {
  4.     bool bflag = false;
  5.     bflag = GServer->AddBuffs( skill, Target, GetInt( ) );
  6.     Log(MSG_INFO,"In UseBuffSkills, skill %i, nbuffs %i, bflag %i",skill->id,skill->nbuffs,bflag);
  7.     if(skill->nbuffs>0 && bflag == true)
  8.     {
  9.         BEGINPACKET( pak, 0x7b5 );
  10.         ADDWORD    ( pak, Target->clientid );
  11.         ADDWORD    ( pak, clientid );
  12.         ADDWORD    ( pak, Battle->skillid );
  13.         ADDWORD    ( pak, GetInt( ) );
  14.         ADDBYTE    ( pak, skill->nbuffs );
  15.         GServer->SendToVisible( &pak, Target );
  16.     }
  17.     BEGINPACKET( pak, 0x7b9);
  18.     ADDWORD    ( pak, clientid);
  19.     ADDWORD    ( pak, Battle->skillid);
  20.     ADDWORD    ( pak, 1);
  21.     GServer->SendToVisible( &pak, (CCharacter*)this );


BY:
  1.  
  2. // use buff skill
  3. void CCharacter::UseBuffSkill( CCharacter* Target, CSkills* skill )
  4. {
  5.     bool gm_invisible=false;
  6.     if (isplayer())
  7.     {
  8.         CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  9.         gm_invisible=testplayer->isInvisibleMode;
  10.     }
  11.  
  12.     bool bflag = false;
  13.     bflag = GServer->AddBuffs( skill, Target, GetInt( ) );
  14.     Log(MSG_INFO,"In UseBuffSkills, skill %i, nbuffs %i, bflag %i",skill->id,skill->nbuffs,bflag);
  15.     if(skill->nbuffs>0 && bflag == true)
  16.     {
  17.         BEGINPACKET( pak, 0x7b5 );
  18.         ADDWORD    ( pak, Target->clientid );
  19.         ADDWORD    ( pak, clientid );
  20.         ADDWORD    ( pak, Battle->skillid );
  21.         ADDWORD    ( pak, GetInt( ) );
  22.         ADDBYTE    ( pak, skill->nbuffs );
  23.  
  24.         if(!gm_invisible)
  25.         {
  26.             GServer->SendToVisible( &pak, Target );
  27.         }
  28.         else
  29.         {
  30.             CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  31.             testplayer->client->SendPacket(&pak);
  32.         }
  33.  
  34.     }
  35.     BEGINPACKET( pak, 0x7b9);
  36.     ADDWORD    ( pak, clientid);
  37.     ADDWORD    ( pak, Battle->skillid);
  38.     ADDWORD    ( pak, 1);
  39.  
  40.     if(!gm_invisible)
  41.     {
  42.         GServer->SendToVisible( &pak, (CCharacter*)this );
  43.     }
  44.     else
  45.     {
  46.         CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  47.         testplayer->client->SendPacket(&pak);
  48.     }
  49.  


And if you want to do the same for AOE skills or other attack skills, just do kinda the same sort of stuff...


amaedict wrote:Also, now that you have the /hide working, shouldnt the same concept work for the hakwer camoflage skill that is currently bugged ?

It's a skill, not the same thing at all, I think Tomiz already made it work.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev 81.360] GM Command bug /hide

Postby Mike567 on Mon Nov 09, 2009 4:51 pm

lmame wrote:Ok my bad I made a typo:

REPLACE:
  1.  
  2.  
  3.     if(Shop->open)
  4.     {
  5.         ADDBYTE( pak, 0x02 );
  6.     }
  7.     else if(otherclient->is_invisible&&!player->is_invisible)
  8.     {
  9.         Log(MSG_INFO,"Player %s should be invisible to %s",otherclient->CharInfo->charname,player->CharInfo->charname);
  10.         ADDBYTE( pak, 0x01 );
  11.     }
  12.     else if(otherclient->is_invisible&&player->is_invisible)
  13.     {
  14.         //2 GMs together in hiding, just for the logs...
  15.         Log(MSG_INFO,"Player %s and %s are both invisible but should see each other.",otherclient->CharInfo->charname,player->CharInfo->charname);
  16.         ADDBYTE( pak, 0x00 );
  17.     }
  18.     else
  19.     {
  20.         ADDBYTE( pak, 0x00 );
  21.     }
  22.  



BY:
  1.  
  2.     if(Shop->open)
  3.     {
  4.         ADDBYTE( pak, 0x02 );
  5.     }
  6.     else if(otherclient->isInvisibleMode&&!player->isInvisibleMode)
  7.     {
  8.         Log(MSG_INFO,"Player %s should be invisible to %s",otherclient->CharInfo->charname,player->CharInfo->charname);
  9.         ADDBYTE( pak, 0x01 );
  10.     }
  11.     else if(otherclient->isInvisibleMode&&player->isInvisibleMode)
  12.     {
  13.         //2 GMs together in hiding, just for the logs...
  14.         Log(MSG_INFO,"Player %s and %s are both invisible but should see each other.",otherclient->CharInfo->charname,player->CharInfo->charname);
  15.         ADDBYTE( pak, 0x00 );
  16.     }
  17.     else
  18.     {
  19.         ADDBYTE( pak, 0x00 );
  20.     }
  21.  

you can also see your self into invisible? if i use that code
User avatar
Mike567
Antares
Antares
 
Posts: 392
Joined: Wed Mar 19, 2008 4:27 am
Location: Philippines

Re: [Dev Rev 81.360] GM Command bug /hide

Postby amaedict on Mon Nov 09, 2009 5:07 pm

lmame wrote:
amaedict wrote:just a little side request.
in future maybe if possible make buffs invisible too when character is invisible. Currently,after using the /hide command, if you use gm buffs and buff yourself other players cant see you, but they can see the buffs on you.

You can do that yourself quite easily, don't send the effects packets for skills if the player is invisible, something like:

REPLACE In "charfunctions.cpp"::
  1.  
  2.     //if (getClient()==NULL)
  3.        GServer->SendToVisible( &pak, this );
  4.     /*else
  5.         getClient();*/


BY:
  1.  
  2.     if(IsPlayer())
  3.     {
  4.         CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  5.         if(!testplayer->isInvisibleMode)
  6.         {
  7.             //if (getClient()==NULL)
  8.                GServer->SendToVisible( &pak, this );
  9.             /*else
  10.                 getClient();*/
  11.         }
  12.         else
  13.         {
  14.             testplayer->client->SendPacket(&pak);
  15.         }
  16.  
  17.     }
  18.     else
  19.     {
  20.         GServer->SendToVisible( &pak, this );
  21.     }


This way it should only send the skill packets to himself if the guy is invisible but you need to do it too in battle.cpp, for example:
REPLACE:
  1. // use buff skill
  2. void CCharacter::UseBuffSkill( CCharacter* Target, CSkills* skill )
  3. {
  4.     bool bflag = false;
  5.     bflag = GServer->AddBuffs( skill, Target, GetInt( ) );
  6.     Log(MSG_INFO,"In UseBuffSkills, skill %i, nbuffs %i, bflag %i",skill->id,skill->nbuffs,bflag);
  7.     if(skill->nbuffs>0 && bflag == true)
  8.     {
  9.         BEGINPACKET( pak, 0x7b5 );
  10.         ADDWORD    ( pak, Target->clientid );
  11.         ADDWORD    ( pak, clientid );
  12.         ADDWORD    ( pak, Battle->skillid );
  13.         ADDWORD    ( pak, GetInt( ) );
  14.         ADDBYTE    ( pak, skill->nbuffs );
  15.         GServer->SendToVisible( &pak, Target );
  16.     }
  17.     BEGINPACKET( pak, 0x7b9);
  18.     ADDWORD    ( pak, clientid);
  19.     ADDWORD    ( pak, Battle->skillid);
  20.     ADDWORD    ( pak, 1);
  21.     GServer->SendToVisible( &pak, (CCharacter*)this );


BY:
  1.  
  2. // use buff skill
  3. void CCharacter::UseBuffSkill( CCharacter* Target, CSkills* skill )
  4. {
  5.     bool gm_invisible=false;
  6.     if (isplayer())
  7.     {
  8.         CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  9.         gm_invisible=testplayer->isInvisibleMode;
  10.     }
  11.  
  12.     bool bflag = false;
  13.     bflag = GServer->AddBuffs( skill, Target, GetInt( ) );
  14.     Log(MSG_INFO,"In UseBuffSkills, skill %i, nbuffs %i, bflag %i",skill->id,skill->nbuffs,bflag);
  15.     if(skill->nbuffs>0 && bflag == true)
  16.     {
  17.         BEGINPACKET( pak, 0x7b5 );
  18.         ADDWORD    ( pak, Target->clientid );
  19.         ADDWORD    ( pak, clientid );
  20.         ADDWORD    ( pak, Battle->skillid );
  21.         ADDWORD    ( pak, GetInt( ) );
  22.         ADDBYTE    ( pak, skill->nbuffs );
  23.  
  24.         if(!gm_invisible)
  25.         {
  26.             GServer->SendToVisible( &pak, Target );
  27.         }
  28.         else
  29.         {
  30.             CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  31.             testplayer->client->SendPacket(&pak);
  32.         }
  33.  
  34.     }
  35.     BEGINPACKET( pak, 0x7b9);
  36.     ADDWORD    ( pak, clientid);
  37.     ADDWORD    ( pak, Battle->skillid);
  38.     ADDWORD    ( pak, 1);
  39.  
  40.     if(!gm_invisible)
  41.     {
  42.         GServer->SendToVisible( &pak, (CCharacter*)this );
  43.     }
  44.     else
  45.     {
  46.         CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
  47.         testplayer->client->SendPacket(&pak);
  48.     }
  49.  


And if you want to do the same for AOE skills or other attack skills, just do kinda the same sort of stuff...


amaedict wrote:Also, now that you have the /hide working, shouldnt the same concept work for the hakwer camoflage skill that is currently bugged ?

It's a skill, not the same thing at all, I think Tomiz already made it work.




I got this error while building world server.

battle.cpp||In member function `void CCharacter::UseBuffSkill(CCharacter*, CSkills*)':|
battle.cpp|1504|error: `isplayer' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings ===|
We Have it all ... Image
Image
User avatar
amaedict
Clown
Clown
 
Posts: 531
Joined: Thu Apr 23, 2009 2:44 pm

Re: [Dev Rev 81.360] GM Command bug /hide

Postby lmame on Mon Nov 09, 2009 11:10 pm

amaedict wrote:I got this error while building world server.

battle.cpp||In member function `void CCharacter::UseBuffSkill(CCharacter*, CSkills*)':|
battle.cpp|1504|error: `isplayer' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings ===|

Change isplayer by IsPlayer, come on, try something on C++ you too...


Mike567 wrote:you can also see your self into invisible? if i use that code

You are invisible to other players, of course you can see your avatar, just like before...
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

PreviousNext

Return to Bugs

Who is online

Users browsing this forum: No registered users and 20 guests

cron