XP - Most Hated
Moderator: Team Members
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
XP - Most Hated
Doing a preliminary test of dragging NPC's to the guards, it appears you do not have to do any damage at all and get XP. I am thinking we need to do a check for most hated on giving XP out. If I remember right XP was handing out if you do over half damage. It would also be good to have a rule for those who want to change that, maybe "GuardsStealXP", and if anything on the hate list of the dead is not a player, then no XP. Thoughts? I am going to make a change on my end and paste it here sometime this weekend.
Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: XP - Most Hated
I would say if you need to go to a guard then you should get no xp at all, however with roaming guards that could be a problem. How does this work on live?
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: XP - Most Hated
Good question.
IMHO, if the guard is even on the hate list, you really should get no XP. Basically if anyone other then a player in on the hate list, I do not want them getting XP on my server. I was working on this morning but everytime I referenced MostHated I was getting a crash, then I decided to work on the yard. It may be Sunday night before I get back on it.
IMHO, if the guard is even on the hate list, you really should get no XP. Basically if anyone other then a player in on the hate list, I do not want them getting XP on my server. I was working on this morning but everytime I referenced MostHated I was getting a crash, then I decided to work on the yard. It may be Sunday night before I get back on it.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: XP - Most Hated
I have worked some code in and it should work, but does not. I am thinking it is Brain()->GetMostHated(). When I run an NPC to the guard, even though I have not damaged it, I am supposedly still high on the hate list. Even after the guard kills the NPC I am the top of the hate list some of the time, but not all of the time.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: XP - Most Hated
Looking at it, there seems to be an issue. I think the hate is added after the NPC is dead, not sure why the hp check is there. But lets say you run by an NPC, 50 points of hate is added to you. Then you run it to a guard, 50 points is added to the guard. Then the guard hits an NPC for 80 points of damage, killing it instantly. The hate checks for HP, the mob has 0, it is dead, no hate is added. So you end up having the same exact hate as the guard. I think the damage needs to be added after the hate is added. This is where I moved it.
Code: Select all
else{
hit_result = DAMAGE_PACKET_RESULT_SUCCESSFUL;
GetZone()->CallSpawnScript(victim, SPAWN_SCRIPT_HEALTHCHANGED, this);
damage = victim->CheckWards(damage, damage_type);
if (victim->IsNPC() && victim->GetHP() > 0) {
((Entity*)victim)->AddHate(this, damage);
victim->TakeDamage(damage);You do not have the required permissions to view the files attached to this post.
Resident Dirty Hippy
Who is online
Users browsing this forum: No registered users and 0 guests