aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/MovementHandler.cpp8
-rw-r--r--src/game/ReputationMgr.cpp2
-rw-r--r--src/game/Unit.cpp12
3 files changed, 17 insertions, 5 deletions
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index 08c884c7c55..58bc5004e1f 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -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();
diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp
index ee7ca8d44a4..d56d17cdb78 100644
--- a/src/game/ReputationMgr.cpp
+++ b/src/game/ReputationMgr.cpp
@@ -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;
}
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 9fb27e82a3c..44e27bbd76c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -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);
- return 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)