*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:
@@ -67,7 +67,13 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
GetPlayer()->SetSemaphoreTeleportFar(false);
|
||||
|
||||
// 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()->SendInitialPacketsBeforeAddToMap();
|
||||
|
||||
@@ -255,7 +255,7 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
|
||||
if(incremental)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
+8
-2
@@ -6799,9 +6799,15 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
// Death Strike healing effect
|
||||
if (dummySpell->Id == 45469)
|
||||
{
|
||||
int32 heal=pVictim->GetDiseasesByCaster(GetGUID()) * GetMaxHealth()* 5 /100;
|
||||
CastCustomSpell(this,45470,&heal,NULL,NULL,true);
|
||||
basepoints0=pVictim->GetDiseasesByCaster(GetGUID()) * GetMaxHealth()* procSpell->DmgMultiplier[0] / 100.0f;
|
||||
// Do not heal when no diseases on target
|
||||
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
|
||||
if (dummySpell->SpellIconID == 1939 && GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
Reference in New Issue
Block a user