Jump to content
  • 0

Help i created a mapflag


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

i create a new mapflag but i don't know how can i source the you can't see the damage of players like on woe.

anyone can help me?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

map_flag_gvg(src->m) is a macro, that the same as :

assuming src->m = m;

(map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle))

 

so ye you can put map_flag_tvt(src->m) if you wish but that mean you'll have to define what is map_flag_tvt, either a function or a macro.

you can simply use your mapflag like this :

assuming my mapflag is tvt;

if(map[m].flag.tvt){ //the map m as the mapflag tvt on

 foo; //do foo

}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Hi,

you need to use your mapflag in src/map/clif.c, add a condition in clif_damage, you'll found the current one for hide_dammage, so you can do something similar.

Basically you want to send 0 for those attribute on packet if your flag is on.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

Hi,

you need to use your mapflag in src/map/clif.c, add a condition in clif_damage, you'll found the current one for hide_dammage, so you can do something similar.

Basically you want to send 0 for those attribute on packet if your flag is on.

i will try it thanks for replying lighta . i want that you can't see the damage like on WoE

Edited by TrojanWorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Oki let me know how did it go =)

The step I told you are to hide the dammage ye.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

Oki let me know how did it go =)

The step I told you are to hide the dammage ye.

is my new mapflag can be done like this?

map_flag_tvt(src->m)?

cuz i see this

map_flag_gvg(src->m)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

map_flag_gvg(src->m) is a macro, that the same as :

assuming src->m = m;

(map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle))

 

so ye you can put map_flag_tvt(src->m) if you wish but that mean you'll have to define what is map_flag_tvt, either a function or a macro.

you can simply use your mapflag like this :

assuming my mapflag is tvt;

if(map[m].flag.tvt){ //the map m as the mapflag tvt on

 foo; //do foo

}

thanks lighta

i got a error on compiling

it say 

 

clif.c: In function âclif_damageâ:
clif.c:4243: error: âmâ undeclared (first use in this function)
clif.c:4243: error: (Each undeclared identifier is reported only once
clif.c:4243: error: for each function it appears in.)

 

i do like this

 

   
 if (battle_config.hide_woe_damage && map_flag_gvg(src->m) || map[m].flag.fvf) {
        WBUFW(buf,22)=damage?div:0;
        WBUFW(buf,27)=damage2?div:0;
    }

solved. thanks lighta

Edited by TrojanWorm
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...