Removed all my commits for today, this is hack? really? okey

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-01-13 19:11:46 +03:00
parent edeb6bf284
commit f7ad3aefc8
9 changed files with 36 additions and 51 deletions
@@ -1556,7 +1556,7 @@ CreatureAI* GetAI_npc_winter_reveler(Creature* pCreature)
#define SPELL_DEADLY_POISON 34655 //Venomous Snake
#define SPELL_CRIPPLING_POISON 3409 //Viper
#define VENOMOUS_SNAKE_TIMER 1500
#define VENOMOUS_SNAKE_TIMER 1200
#define VIPER_TIMER 3000
#define C_VIPER 19921
@@ -1585,6 +1585,13 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
else
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
uint32 delta = (rand() % 7) * 100;
m_creature->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta);
@@ -1650,7 +1657,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
}
else //Venomous Snake
{
if (urand(0,2) == 0) //33% chance to cast
if (urand(0,9) < 8) //80% chance to cast
DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON);
SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100;
}
+1 -3
View File
@@ -1499,9 +1499,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty)
continue;
player->SetDungeonDifficulty(difficulty);
player->SendDungeonDifficulty(true);
// 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);
//send player to recall positio nis a dungeon (to avoid an exploit)
}
}
+14 -12
View File
@@ -488,18 +488,20 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
uint64 guid;
recv_data >> guid;
if(GetPlayer()->IsInWorld())
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
{
GetPlayer()->SetMover(mover);
if(mover != GetPlayer() && mover->canFly())
{
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
data.append(mover->GetPackGUID());
data << uint32(0);
SendPacket(&data);
}
}
if(guid == GetPlayer()->m_mover->GetGUID())
return;
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
{
GetPlayer()->SetMover(mover);
if(mover != GetPlayer() && mover->canFly())
{
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
data.append(mover->GetPackGUID());
data << uint32(0);
SendPacket(&data);
}
}
else
{
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());
+1 -20
View File
@@ -498,10 +498,7 @@ void Pet::setDeathState(DeathState s) // overwrite virtual
void Pet::Update(uint32 diff)
{
if (m_removed) // pet already removed, just wait in remove queue, no updates
return;
if (m_loading)
if(m_removed) // pet already removed, just wait in remove queue, no updates
return;
switch( m_deathState )
@@ -972,22 +969,6 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
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
{
SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f));
+5 -3
View File
@@ -17016,11 +17016,15 @@ void Player::SaveToDB()
sLog.outDebug("The value of player %s at save: ", m_name.c_str());
outDebugValues();
CharacterDatabase.BeginTransaction();
CharacterDatabase.PExecute("DELETE FROM characters WHERE guid = '%u'",GetGUIDLow());
std::string sql_name = m_name;
CharacterDatabase.escape_string(sql_name);
std::ostringstream ss;
ss << "REPLACE INTO characters (guid,account,name,race,class,gender,level,xp,money,playerBytes,playerBytes2,playerFlags,"
ss << "INSERT 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, "
"taximask, online, cinematic, "
"totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, "
@@ -17112,8 +17116,6 @@ void Player::SaveToDB()
ss << uint32(m_activeSpec);
ss << ")";
CharacterDatabase.BeginTransaction();
CharacterDatabase.Execute( ss.str().c_str() );
if (m_mailsUpdated) //save mails only when needed
+3 -3
View File
@@ -4755,7 +4755,7 @@ void AuraEffect::HandleAuraModWeaponCritPercent(AuraApplication const * aurApp,
return;
for (int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i), true))
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i)))
((Player*)target)->_ApplyWeaponDependentAuraCritMod(pItem,WeaponAttackType(i),this,apply);
// 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)
{
for (int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i), true))
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i)))
((Player*)target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
}
@@ -5163,7 +5163,7 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const * aurApp, uint
if(target->GetTypeId() == TYPEID_PLAYER)
{
for (int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i), true))
if(Item* pItem = ((Player*)target)->GetWeaponForAttack(WeaponAttackType(i)))
((Player*)target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
}
-4
View File
@@ -639,10 +639,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
// Eviscerate and Envenom Bonus Damage (item set effect)
if (m_caster->HasAura(SPELL_EVISCERATE_AND_ENVENOM_BONUS_DAMAGE_37169))
damage += combo*40;
// Apply spell mods
if (Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DAMAGE, damage);
}
}
break;
+2 -2
View File
@@ -10018,7 +10018,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask)
DoneAdvertisedBenefit += int32(GetTotalAttackPowerValue(BASE_ATTACK) * (*i)->GetAmount() / 100.0f);
}
return DoneAdvertisedBenefit > 0 ? DoneAdvertisedBenefit : 0;
return DoneAdvertisedBenefit;
}
int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim)
@@ -10038,7 +10038,7 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic
if (((*i)->GetMiscValue() & schoolMask) != 0)
TakenAdvertisedBenefit += (*i)->GetAmount();
return TakenAdvertisedBenefit > 0 ? TakenAdvertisedBenefit : 0;
return TakenAdvertisedBenefit;
}
bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const
+1 -2
View File
@@ -297,8 +297,7 @@ void AuthSocket::OnRead()
///- Report unknown commands in the debug log
if (i == AUTH_TOTAL_COMMANDS)
{
DEBUG_LOG("[Auth] got unknown packet from '%s:%d'", GetRemoteAddress().c_str(), GetRemotePort());
SetCloseAndDelete();
DEBUG_LOG("[Auth] got unknown packet %u", (uint32)_cmd);
return;
}
}