Fix RoF+ OP_Animation handling

That's handled in the patch file
This commit is contained in:
Michael Cook (mackal) 2015-04-06 16:13:58 -04:00
parent 7662eaf983
commit 7bd185b7b7

View File

@ -336,7 +336,7 @@ void MapOpcodes()
// Use or Ignore sense heading based on rule.
bool train=RuleB(Skills, TrainSenseHeading);
ConnectedOpcodes[OP_SenseHeading] =
ConnectedOpcodes[OP_SenseHeading] =
(train) ? &Client::Handle_OP_SenseHeading : &Client::Handle_OP_Ignore;
ConnectedOpcodes[OP_SenseTraps] = &Client::Handle_OP_SenseTraps;
@ -412,10 +412,10 @@ int Client::HandlePacket(const EQApplicationPacket *app)
if (Log.log_settings[Logs::Client_Server_Packet].is_category_enabled == 1)
Log.Out(Logs::General, Logs::Client_Server_Packet, "[%s - 0x%04x] [Size: %u]", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size());
if (Log.log_settings[Logs::Client_Server_Packet_With_Dump].is_category_enabled == 1)
Log.Out(Logs::General, Logs::Client_Server_Packet_With_Dump, "[%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size(), DumpPacketToString(app).c_str());
EmuOpcode opcode = app->GetOpcode();
if (opcode == OP_AckPacket) {
return true;
@ -457,7 +457,7 @@ int Client::HandlePacket(const EQApplicationPacket *app)
case CLIENT_CONNECTED: {
ClientPacketProc p;
p = ConnectedOpcodes[opcode];
if(p == nullptr) {
if(p == nullptr) {
std::vector<EQEmu::Any> args;
args.push_back(const_cast<EQApplicationPacket*>(app));
parse->EventPlayer(EVENT_UNHANDLED_OPCODE, this, "", 0, &args);
@ -2624,7 +2624,7 @@ void Client::Handle_OP_AltCurrencyReclaim(const EQApplicationPacket *app)
/* Cursor to Item storage */
else {
uint32 max_currency = GetAlternateCurrencyValue(reclaim->currency_id);
if(max_currency == 0 || reclaim->count == 0)
return;
@ -2831,12 +2831,8 @@ void Client::Handle_OP_Animation(const EQApplicationPacket *app)
Animation_Struct *s = (Animation_Struct *)app->pBuffer;
//might verify spawn ID, but it wouldent affect anything
if (GetClientVersion() >= ClientVersion::RoF) {
DoAnim(s->speed, s->action); //This was backwards so we gotta make up for it here
} else {
DoAnim(s->action, s->speed);
}
DoAnim(s->action, s->speed);
return;
}
@ -3018,7 +3014,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
{
DeleteItemInInventory(slot_id, 0, true);
DeleteItemInInventory(MainCursor, 0, true);
if (PutItemInInventory(slot_id, *itemOneToPush, true))
{
CalcBonuses();
@ -5424,12 +5420,12 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
/* EVENT_ENVIRONMENTAL_DAMAGE */
int final_damage = (damage * RuleR(Character, EnvironmentDamageMulipliter));
char buf[24];
snprintf(buf, 23, "%u %u %i", ed->damage, ed->dmgtype, final_damage);
snprintf(buf, 23, "%u %u %i", ed->damage, ed->dmgtype, final_damage);
parse->EventPlayer(EVENT_ENVIRONMENTAL_DAMAGE, this, buf, 0);
}
if (GetHP() <= 0) {
mod_client_death_env();
mod_client_death_env();
Death(0, 32000, SPELL_UNKNOWN, SkillHandtoHand);
}
SendHPUpdate();
@ -9846,7 +9842,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
Message_StringID(10, CANNOT_WAKE, mypet->GetCleanName(), GetTarget()->GetCleanName());
break;
}
if (!mypet->IsAttackAllowed(GetTarget())) {
mypet->Say_StringID(NOT_LEGAL_TARGET);
break;
@ -9942,7 +9938,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
}
}
break;
}
}
case PET_TAUNT_ON: {
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 3) || mypet->GetPetType() != petAnimation) {
Message_StringID(MT_PetResponse, PET_DO_TAUNT);
@ -11676,7 +11672,7 @@ void Client::Handle_OP_SenseHeading(const EQApplicationPacket *app)
// eventually sends a message.
if (GetLevel() <= 8)
chancemod += (9-level) * 10;
CheckIncreaseSkill(SkillSenseHeading, nullptr, chancemod);
return;
@ -12317,7 +12313,7 @@ void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app)
int freeslot = 0;
if (charges > 0 && (freeslot = zone->SaveTempItem(vendor->CastToNPC()->MerchantType, vendor->GetNPCTypeID(), itemid, charges, true)) > 0){
ItemInst* inst2 = inst->Clone();
while (true) {
if (inst2 == nullptr)
break;
@ -13405,7 +13401,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
safe_delete(gis);
this->Trader_StartTrader();
// This refreshes the Trader window to display the End Trader button
if (GetClientVersion() >= ClientVersion::RoF)
{
@ -13550,7 +13546,7 @@ void Client::Handle_OP_TraderShop(const EQApplicationPacket *app)
if (app->size == sizeof(TraderClick_Struct))
{
TraderClick_Struct* tcs = (TraderClick_Struct*)app->pBuffer;
Log.Out(Logs::Detail, Logs::Trading, "Handle_OP_TraderShop: TraderClick_Struct TraderID %d, Code %d, Unknown008 %d, Approval %d",