Thread: Taunt
View Single Post
  #1  
Old 05-10-2008, 05:26 PM
jenco420
Banned
 
Join Date: Jan 2006
Location: /dev/null
Posts: 99
Default Taunt

Alright been looking at taunt recently b/c i never get a failed message when a taunt so i peeked in special_attacks.cpp to see how taunt worked on eqemu.

Looking at the code i see that it can fail but it seems when ever i loose aggro and taunt it switches right back to me everytime?

Am i just crazy or has anyone else noticed this ? :P

Code:
float tauntchance;
		if(always_succeed) {
			tauntchance = 101;
		} else {
			
			// no idea how taunt success is actually calculated
			// TODO: chance for level 50+ mobs should be lower
			int level_difference = level - target->GetLevel();
			if (level_difference <= 5) {
				tauntchance = 25.0;	// minimum
				tauntchance += tauntchance * (float)GetSkill(TAUNT) / 200.0;	// skill modifier
				if (tauntchance > 65.0)
					tauntchance = 65.0;
			}
			else if (level_difference <= 10) {
				tauntchance = 30.0;	// minimum
				tauntchance += tauntchance * (float)GetSkill(TAUNT) / 200.0;	// skill modifier
				if (tauntchance > 85.0)
					tauntchance = 85.0;
			}
			else if (level_difference <= 15) {
				tauntchance = 40.0;	// minimum
				tauntchance += tauntchance * (float)GetSkill(TAUNT) / 200.0;	// skill modifier
				if (tauntchance > 90.0)
					tauntchance = 90.0;
			}
			else {
				tauntchance = 50.0;	// minimum
				tauntchance += tauntchance * (float)GetSkill(TAUNT) / 200.0;	// skill modifier
				if (tauntchance > 95.0)
					tauntchance = 95.0;
			}
		}
i noticed if(always_succeed) {tauntchance = 101; how does the server know when to use this? sorry i'm new to programming in general reading the code is pretty easy for the most part but i get confused easy sometimes ~.~
Reply With Quote