nope.
still doesn't work.
Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators
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.
amaedict wrote:Also, now that you have the /hide working, shouldnt the same concept work for the hakwer camoflage skill that is currently bugged ?
lmame wrote:Ok my bad I made a typo:
REPLACE:
- if(Shop->open)
- {
- ADDBYTE( pak, 0x02 );
- }
- else if(otherclient->is_invisible&&!player->is_invisible)
- {
- Log(MSG_INFO,"Player %s should be invisible to %s",otherclient->CharInfo->charname,player->CharInfo->charname);
- ADDBYTE( pak, 0x01 );
- }
- else if(otherclient->is_invisible&&player->is_invisible)
- {
- //2 GMs together in hiding, just for the logs...
- Log(MSG_INFO,"Player %s and %s are both invisible but should see each other.",otherclient->CharInfo->charname,player->CharInfo->charname);
- ADDBYTE( pak, 0x00 );
- }
- else
- {
- ADDBYTE( pak, 0x00 );
- }
BY:
- if(Shop->open)
- {
- ADDBYTE( pak, 0x02 );
- }
- else if(otherclient->isInvisibleMode&&!player->isInvisibleMode)
- {
- Log(MSG_INFO,"Player %s should be invisible to %s",otherclient->CharInfo->charname,player->CharInfo->charname);
- ADDBYTE( pak, 0x01 );
- }
- else if(otherclient->isInvisibleMode&&player->isInvisibleMode)
- {
- //2 GMs together in hiding, just for the logs...
- Log(MSG_INFO,"Player %s and %s are both invisible but should see each other.",otherclient->CharInfo->charname,player->CharInfo->charname);
- ADDBYTE( pak, 0x00 );
- }
- else
- {
- ADDBYTE( pak, 0x00 );
- }
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"::
- //if (getClient()==NULL)
- GServer->SendToVisible( &pak, this );
- /*else
- getClient();*/
BY:
- if(IsPlayer())
- {
- CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
- if(!testplayer->isInvisibleMode)
- {
- //if (getClient()==NULL)
- GServer->SendToVisible( &pak, this );
- /*else
- getClient();*/
- }
- else
- {
- testplayer->client->SendPacket(&pak);
- }
- }
- else
- {
- GServer->SendToVisible( &pak, this );
- }
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:
- // use buff skill
- void CCharacter::UseBuffSkill( CCharacter* Target, CSkills* skill )
- {
- bool bflag = false;
- bflag = GServer->AddBuffs( skill, Target, GetInt( ) );
- Log(MSG_INFO,"In UseBuffSkills, skill %i, nbuffs %i, bflag %i",skill->id,skill->nbuffs,bflag);
- if(skill->nbuffs>0 && bflag == true)
- {
- BEGINPACKET( pak, 0x7b5 );
- ADDWORD ( pak, Target->clientid );
- ADDWORD ( pak, clientid );
- ADDWORD ( pak, Battle->skillid );
- ADDWORD ( pak, GetInt( ) );
- ADDBYTE ( pak, skill->nbuffs );
- GServer->SendToVisible( &pak, Target );
- }
- BEGINPACKET( pak, 0x7b9);
- ADDWORD ( pak, clientid);
- ADDWORD ( pak, Battle->skillid);
- ADDWORD ( pak, 1);
- GServer->SendToVisible( &pak, (CCharacter*)this );
BY:
- // use buff skill
- void CCharacter::UseBuffSkill( CCharacter* Target, CSkills* skill )
- {
- bool gm_invisible=false;
- if (isplayer())
- {
- CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
- gm_invisible=testplayer->isInvisibleMode;
- }
- bool bflag = false;
- bflag = GServer->AddBuffs( skill, Target, GetInt( ) );
- Log(MSG_INFO,"In UseBuffSkills, skill %i, nbuffs %i, bflag %i",skill->id,skill->nbuffs,bflag);
- if(skill->nbuffs>0 && bflag == true)
- {
- BEGINPACKET( pak, 0x7b5 );
- ADDWORD ( pak, Target->clientid );
- ADDWORD ( pak, clientid );
- ADDWORD ( pak, Battle->skillid );
- ADDWORD ( pak, GetInt( ) );
- ADDBYTE ( pak, skill->nbuffs );
- if(!gm_invisible)
- {
- GServer->SendToVisible( &pak, Target );
- }
- else
- {
- CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
- testplayer->client->SendPacket(&pak);
- }
- }
- BEGINPACKET( pak, 0x7b9);
- ADDWORD ( pak, clientid);
- ADDWORD ( pak, Battle->skillid);
- ADDWORD ( pak, 1);
- if(!gm_invisible)
- {
- GServer->SendToVisible( &pak, (CCharacter*)this );
- }
- else
- {
- CPlayer* testplayer=reinterpret_cast<CPlayer*>(this);
- testplayer->client->SendPacket(&pak);
- }
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.
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 ===|
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 ===|
Mike567 wrote:you can also see your self into invisible? if i use that code
Users browsing this forum: No registered users and 5 guests