The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 0
HELP, please check my code :)
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
namerpus18
Good day everyone,
I am new and still learning in source code and I want to try to make something for my project using lines from the source code itself.
What I am trying to achieve here is to log char IDs of all those who attacked the monster(MVP). I am focusing this one before proceeding to the next step. Did I make it right?
Thank you so much as always,
EDITED:
Or should I use this one? from pc.ccp
void pc_damage_log_add(map_session_data *sd, int id) { uint8 i = 0; if (!sd || !id) return; //Only store new data, don't need to renew the old one with same id ARR_FIND(0, DAMAGELOG_SIZE_PC, i, sd->dmglog[i] == id); if (i < DAMAGELOG_SIZE_PC) return; for (i = 0; i < DAMAGELOG_SIZE_PC; i++) { if (sd->dmglog[i] == 0) { sd->dmglog[i] = id; return; } } }
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.