Backed out changeset: 52e769d95f14
--HG-- branch : trunk
This commit is contained in:
@@ -1556,7 +1556,7 @@ CreatureAI* GetAI_npc_winter_reveler(Creature* pCreature)
|
|||||||
#define SPELL_DEADLY_POISON 34655 //Venomous Snake
|
#define SPELL_DEADLY_POISON 34655 //Venomous Snake
|
||||||
#define SPELL_CRIPPLING_POISON 3409 //Viper
|
#define SPELL_CRIPPLING_POISON 3409 //Viper
|
||||||
|
|
||||||
#define VENOMOUS_SNAKE_TIMER 1200
|
#define VENOMOUS_SNAKE_TIMER 1500
|
||||||
#define VIPER_TIMER 3000
|
#define VIPER_TIMER 3000
|
||||||
|
|
||||||
#define C_VIPER 19921
|
#define C_VIPER 19921
|
||||||
@@ -1585,13 +1585,6 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
|||||||
else
|
else
|
||||||
IsViper = false;
|
IsViper = false;
|
||||||
|
|
||||||
//We have to reload the states from db for summoned guardians
|
|
||||||
CreatureBaseStats const* stats = CreatureBaseStats::GetBaseStats(m_creature->getLevel(), Info->unit_class);
|
|
||||||
m_creature->SetMaxHealth(stats->GenerateHealth(Info));
|
|
||||||
m_creature->SetHealth(stats->GenerateMana(Info));
|
|
||||||
m_creature->SetStatFloatValue(UNIT_FIELD_MINDAMAGE, Info->mindmg);
|
|
||||||
m_creature->SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, Info->maxdmg);
|
|
||||||
|
|
||||||
//Add delta to make them not all hit the same time
|
//Add delta to make them not all hit the same time
|
||||||
uint32 delta = (rand() % 7) * 100;
|
uint32 delta = (rand() % 7) * 100;
|
||||||
m_creature->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta);
|
m_creature->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta);
|
||||||
@@ -1657,7 +1650,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
else //Venomous Snake
|
else //Venomous Snake
|
||||||
{
|
{
|
||||||
if (urand(0,9) < 8) //80% chance to cast
|
if (urand(0,2) == 0) //33% chance to cast
|
||||||
DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON);
|
DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON);
|
||||||
SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100;
|
SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -1499,7 +1499,9 @@ void Group::SetDungeonDifficulty(Difficulty difficulty)
|
|||||||
continue;
|
continue;
|
||||||
player->SetDungeonDifficulty(difficulty);
|
player->SetDungeonDifficulty(difficulty);
|
||||||
player->SendDungeonDifficulty(true);
|
player->SendDungeonDifficulty(true);
|
||||||
//send player to recall positio nis a dungeon (to avoid an exploit)
|
// Send player to recall position is a dungeon (to avoid an exploit)
|
||||||
|
if (sMapStore.LookupEntry(player->GetMap()->IsDungeon()))
|
||||||
|
player->TeleportTo(player->m_recallMap, player->m_recallX, player->m_recallY, player->m_recallZ, player->m_recallO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -488,9 +488,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
|
|||||||
uint64 guid;
|
uint64 guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
if(guid == GetPlayer()->m_mover->GetGUID())
|
if(GetPlayer()->IsInWorld())
|
||||||
return;
|
|
||||||
|
|
||||||
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
||||||
{
|
{
|
||||||
GetPlayer()->SetMover(mover);
|
GetPlayer()->SetMover(mover);
|
||||||
|
|||||||
@@ -501,6 +501,9 @@ void Pet::Update(uint32 diff)
|
|||||||
if (m_removed) // pet already removed, just wait in remove queue, no updates
|
if (m_removed) // pet already removed, just wait in remove queue, no updates
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (m_loading)
|
||||||
|
return;
|
||||||
|
|
||||||
switch( m_deathState )
|
switch( m_deathState )
|
||||||
{
|
{
|
||||||
case CORPSE:
|
case CORPSE:
|
||||||
@@ -969,6 +972,22 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
|||||||
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
|
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 19833: //Snake Trap - Venomous Snake
|
||||||
|
{
|
||||||
|
SetCreateHealth(uint32(107 * (petlevel - 40) * 0.025f));
|
||||||
|
SetCreateMana(0);
|
||||||
|
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel / 2) - 25));
|
||||||
|
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel / 2) - 18));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 19921: //Snake Trap - Viper
|
||||||
|
{
|
||||||
|
SetCreateHealth(uint32(107 * (petlevel - 40) * 0.025f));
|
||||||
|
SetCreateMana(0);
|
||||||
|
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel / 2 - 10));
|
||||||
|
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel / 2));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 31216: // Mirror Image
|
case 31216: // Mirror Image
|
||||||
{
|
{
|
||||||
SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f));
|
SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f));
|
||||||
|
|||||||
+3
-5
@@ -17016,15 +17016,11 @@ void Player::SaveToDB()
|
|||||||
sLog.outDebug("The value of player %s at save: ", m_name.c_str());
|
sLog.outDebug("The value of player %s at save: ", m_name.c_str());
|
||||||
outDebugValues();
|
outDebugValues();
|
||||||
|
|
||||||
CharacterDatabase.BeginTransaction();
|
|
||||||
|
|
||||||
CharacterDatabase.PExecute("DELETE FROM characters WHERE guid = '%u'",GetGUIDLow());
|
|
||||||
|
|
||||||
std::string sql_name = m_name;
|
std::string sql_name = m_name;
|
||||||
CharacterDatabase.escape_string(sql_name);
|
CharacterDatabase.escape_string(sql_name);
|
||||||
|
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << "INSERT INTO characters (guid,account,name,race,class,gender,level,xp,money,playerBytes,playerBytes2,playerFlags,"
|
ss << "REPLACE INTO characters (guid,account,name,race,class,gender,level,xp,money,playerBytes,playerBytes2,playerFlags,"
|
||||||
"map, instance_id, dungeon_difficulty, position_x, position_y, position_z, orientation, data, "
|
"map, instance_id, dungeon_difficulty, position_x, position_y, position_z, orientation, data, "
|
||||||
"taximask, online, cinematic, "
|
"taximask, online, cinematic, "
|
||||||
"totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, "
|
"totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, "
|
||||||
@@ -17116,6 +17112,8 @@ void Player::SaveToDB()
|
|||||||
ss << uint32(m_activeSpec);
|
ss << uint32(m_activeSpec);
|
||||||
ss << ")";
|
ss << ")";
|
||||||
|
|
||||||
|
CharacterDatabase.BeginTransaction();
|
||||||
|
|
||||||
CharacterDatabase.Execute( ss.str().c_str() );
|
CharacterDatabase.Execute( ss.str().c_str() );
|
||||||
|
|
||||||
if (m_mailsUpdated) //save mails only when needed
|
if (m_mailsUpdated) //save mails only when needed
|
||||||
|
|||||||
@@ -4755,7 +4755,7 @@ void AuraEffect::HandleAuraModWeaponCritPercent(AuraApplication const * aurApp,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_ATTACK; ++i)
|
for (int i = 0; i < MAX_ATTACK; ++i)
|
||||||
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i)))
|
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i), true))
|
||||||
((Player*)target)->_ApplyWeaponDependentAuraCritMod(pItem,WeaponAttackType(i),this,apply);
|
((Player*)target)->_ApplyWeaponDependentAuraCritMod(pItem,WeaponAttackType(i),this,apply);
|
||||||
|
|
||||||
// mods must be applied base at equipped weapon class and subclass comparison
|
// mods must be applied base at equipped weapon class and subclass comparison
|
||||||
@@ -5076,7 +5076,7 @@ void AuraEffect::HandleModDamageDone(AuraApplication const * aurApp, uint8 mode,
|
|||||||
if(target->GetTypeId() == TYPEID_PLAYER)
|
if(target->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_ATTACK; ++i)
|
for (int i = 0; i < MAX_ATTACK; ++i)
|
||||||
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i)))
|
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i), true))
|
||||||
((Player*)target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
|
((Player*)target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5163,7 +5163,7 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const * aurApp, uint
|
|||||||
if(target->GetTypeId() == TYPEID_PLAYER)
|
if(target->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_ATTACK; ++i)
|
for (int i = 0; i < MAX_ATTACK; ++i)
|
||||||
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i)))
|
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i), true))
|
||||||
((Player*)target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
|
((Player*)target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -639,6 +639,10 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
|||||||
// Eviscerate and Envenom Bonus Damage (item set effect)
|
// Eviscerate and Envenom Bonus Damage (item set effect)
|
||||||
if (m_caster->HasAura(SPELL_EVISCERATE_AND_ENVENOM_BONUS_DAMAGE_37169))
|
if (m_caster->HasAura(SPELL_EVISCERATE_AND_ENVENOM_BONUS_DAMAGE_37169))
|
||||||
damage += combo*40;
|
damage += combo*40;
|
||||||
|
|
||||||
|
// Apply spell mods
|
||||||
|
if (Player* modOwner = m_caster->GetSpellModOwner())
|
||||||
|
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DAMAGE, damage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -10018,7 +10018,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask)
|
|||||||
DoneAdvertisedBenefit += int32(GetTotalAttackPowerValue(BASE_ATTACK) * (*i)->GetAmount() / 100.0f);
|
DoneAdvertisedBenefit += int32(GetTotalAttackPowerValue(BASE_ATTACK) * (*i)->GetAmount() / 100.0f);
|
||||||
|
|
||||||
}
|
}
|
||||||
return DoneAdvertisedBenefit;
|
return DoneAdvertisedBenefit > 0 ? DoneAdvertisedBenefit : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim)
|
int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim)
|
||||||
@@ -10038,7 +10038,7 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic
|
|||||||
if (((*i)->GetMiscValue() & schoolMask) != 0)
|
if (((*i)->GetMiscValue() & schoolMask) != 0)
|
||||||
TakenAdvertisedBenefit += (*i)->GetAmount();
|
TakenAdvertisedBenefit += (*i)->GetAmount();
|
||||||
|
|
||||||
return TakenAdvertisedBenefit;
|
return TakenAdvertisedBenefit > 0 ? TakenAdvertisedBenefit : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const
|
bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const
|
||||||
|
|||||||
@@ -297,7 +297,8 @@ void AuthSocket::OnRead()
|
|||||||
///- Report unknown commands in the debug log
|
///- Report unknown commands in the debug log
|
||||||
if (i == AUTH_TOTAL_COMMANDS)
|
if (i == AUTH_TOTAL_COMMANDS)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("[Auth] got unknown packet %u", (uint32)_cmd);
|
DEBUG_LOG("[Auth] got unknown packet from '%s:%d'", GetRemoteAddress().c_str(), GetRemotePort());
|
||||||
|
SetCloseAndDelete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user