*Update heal calculation formula for Death Strike and apply improved death strike bonus if avalible

*Use floor() function for rounding in rep gain calculation
*Add some debug info to WorldSession::HandleMoveWorldportAckOpcode()

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-18 15:00:36 +02:00
parent 7b1a842041
commit 8499812eb6
3 changed files with 17 additions and 5 deletions
+7 -1
View File
@@ -67,7 +67,13 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->SetSemaphoreTeleportFar(false); GetPlayer()->SetSemaphoreTeleportFar(false);
// relocate the player to the teleport destination // relocate the player to the teleport destination
GetPlayer()->SetMap(MapManager::Instance().CreateMap(loc.mapid, GetPlayer())); GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation); Map * newMap = MapManager::Instance().CreateMap(loc.mapid, GetPlayer());
if (!newMap)
{
sLog.outCrash("map %d could not be created for player "UI64FMTD, loc.mapid, GetPlayer()->GetGUID());
assert (false);
}
GetPlayer()->SetMap(newMap);
GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation); GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation);
GetPlayer()->SendInitialPacketsBeforeAddToMap(); GetPlayer()->SendInitialPacketsBeforeAddToMap();
+1 -1
View File
@@ -255,7 +255,7 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
if(incremental) if(incremental)
{ {
// int32 *= float cause one point loss? // int32 *= float cause one point loss?
standing = (int32)((float)standing * sWorld.getRate(RATE_REPUTATION_GAIN)); standing = floor((float)standing * sWorld.getRate(RATE_REPUTATION_GAIN) + 0.5f);
standing += itr->second.Standing + BaseRep; standing += itr->second.Standing + BaseRep;
} }
+9 -3
View File
@@ -6799,9 +6799,15 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// Death Strike healing effect // Death Strike healing effect
if (dummySpell->Id == 45469) if (dummySpell->Id == 45469)
{ {
int32 heal=pVictim->GetDiseasesByCaster(GetGUID()) * GetMaxHealth()* 5 /100; basepoints0=pVictim->GetDiseasesByCaster(GetGUID()) * GetMaxHealth()* procSpell->DmgMultiplier[0] / 100.0f;
CastCustomSpell(this,45470,&heal,NULL,NULL,true); // Do not heal when no diseases on target
return true; if (!basepoints0)
return true;
// Improved Death Strike
if (AuraEffect const * aurEff = GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2751, 0))
basepoints0 = basepoints0 * (CalculateSpellDamage(aurEff->GetSpellProto(), 2, aurEff->GetSpellProto()->EffectBasePoints[2], this) + 100.0f) / 100.0f;
triggered_spell_id = 45470;
break;
} }
// Sudden Doom // Sudden Doom
if (dummySpell->SpellIconID == 1939 && GetTypeId() == TYPEID_PLAYER) if (dummySpell->SpellIconID == 1939 && GetTypeId() == TYPEID_PLAYER)