View Full Version : [SOLVED] Challanging Implementation

08-09-2014, 10:32 AM
Do you guys think that Threat System can be implemented on players vs Players too ? My ideea is based on this: damaging some1 will generate threath, healing the killer will generate threat, assisting killer will generate threat. All players who generated threat in the last 30 seconds on the player will be in theyr threat table. Do you think it is possible ?
If yes can you give some ideas from where to start ?
Don't give me links like google or smth *_* :) piece of code might help .
Thx for your Support

08-09-2014, 12:35 PM
What would you even use this for?

08-09-2014, 03:32 PM
i'm thinking about a special realm leveling will reqire pvp not mobs.Then I encountered the problem with kill assisters like healer and ppl who don;t kill the target but they assist on the kill, if leveling up reqire to kill the enemy when will healers level up ? i don;t want all of them to be damage-dealers, i want it to be with all classes all specs. that's why i want to build a system like that. Fortunetly some1 sugested me an ideea :)

The idea is based on Containers, I want to atach a hook on damage(mele / spell / ranged) and on heal(on self or on friendly party member).
I made up this scheme: (I'm quite new on Trinity Core -more exacly 2 days-, and i'm not used with any kind of functions from core or how they trigger, otherwise mby i'll do it myself :(, so i heed help do build these scheme):


ThreatContainer CONT[N];

threatner_last interaction

int THREAT = calculate_threat(Dmg);
for each Container chect if threatner exist in container
if yes: reset Timer, Set Threat= old Threat+ new Threat;
else update Container with his id, threat and start timer

On_heal(Healer, Target_Healed, Amount_Healed)
int THREAT = calculate_threat(Amount_Healed);
for each Container chect if Target_Healed exist in container
chect if Healer exist in container
if yes: reset Timer, Set Threat= old Threat+ new Threat;
else update Container with Healer id, threat and start timer

And Container wil be initialized for every player who logs in game;
destroyed after he is dead and all player in threat table are rewarded
initialized back the container when target revives

And mby a update function that every time you make changes to a Threat Container delete threatners that theyr 30 s timeout passed

08-09-2014, 09:14 PM
- Moved. It was not in the correct section. "C++" section isn't for support...