Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PlayerClassLevelInfo target_classInfo;
- PlayerClassLevelInfo owner_classInfo;
- float targetBaseHealth = 0.0f;
- float ownerBaseHealth = 0.0f;
- int incBaseHealth = 0;
- for (uint32 i = MIN_CLASSES; i < MAX_CLASSES; i++)
- {
- if (i == 6 || i == 10)
- continue;
- sObjectMgr.GetPlayerClassLevelInfo(i, target_level, &target_classInfo);
- sObjectMgr.GetPlayerClassLevelInfo(i, owner_level, &owner_classInfo);
- targetBaseHealth += target_classInfo.basehealth;
- ownerBaseHealth += owner_classInfo.basehealth;
- incBaseHealth++;
- }
- targetBaseHealth /= incBaseHealth;
- ownerBaseHealth /= incBaseHealth;
- float damage_percent = olddamage / ownerBaseHealth;
- float damage_scaled = damage_percent * targetBaseHealth;
- damage = damage_scaled;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement