Conflicts:
	common/patches/RoF.cpp
This commit is contained in:
SecretsOTheP 2013-03-23 05:05:16 -04:00
commit b0b342a020
21 changed files with 50 additions and 27 deletions

View File

@ -13,7 +13,7 @@ SET(eqlaunch_headers
ADD_EXECUTABLE(eqlaunch ${eqlaunch_sources} ${eqlaunch_headers})
TARGET_LINK_LIBRARIES(eqlaunch Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE})
TARGET_LINK_LIBRARIES(eqlaunch Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)

View File

@ -126,7 +126,6 @@ void WorldServer::Process() {
default: {
_log(LAUNCHER__NET, "Unknown opcode 0x%x from World of len %d", pack->opcode, pack->size);
//DumpPacket(pack->pBuffer, pack->size);
break;
}
}

View File

@ -19,7 +19,7 @@ ADD_EXECUTABLE(queryserv ${qserv_sources} ${qserv_headers})
ADD_DEFINITIONS(-DQSERV)
TARGET_LINK_LIBRARIES(queryserv Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE})
TARGET_LINK_LIBRARIES(queryserv Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)

View File

@ -19,7 +19,7 @@ SET(shared_memory_headers
ADD_EXECUTABLE(shared_memory ${shared_memory_sources} ${shared_memory_headers})
TARGET_LINK_LIBRARIES(shared_memory Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE})
TARGET_LINK_LIBRARIES(shared_memory Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(shared_memory PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")

View File

@ -21,7 +21,7 @@ ADD_EXECUTABLE(ucs ${ucs_sources} ${ucs_headers})
ADD_DEFINITIONS(-DUCS)
TARGET_LINK_LIBRARIES(ucs Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE})
TARGET_LINK_LIBRARIES(ucs Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)

View File

@ -67,7 +67,7 @@ ADD_EXECUTABLE(world ${world_sources} ${world_headers})
ADD_DEFINITIONS(-DWORLD)
TARGET_LINK_LIBRARIES(world Common ${PERL_LIBRARY} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE})
TARGET_LINK_LIBRARIES(world Common ${PERL_LIBRARY} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)

View File

@ -155,7 +155,7 @@ ADD_EXECUTABLE(zone ${zone_sources} ${zone_headers})
ADD_DEFINITIONS(-DZONE)
TARGET_LINK_LIBRARIES(zone Common ${PERL_LIBRARY} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE})
TARGET_LINK_LIBRARIES(zone Common ${PERL_LIBRARY} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(zone PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
@ -175,4 +175,6 @@ IF(UNIX)
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
INCLUDE_DIRECTORIES(${VLD_INCLUDE_DIR})
SET(EXECUTABLE_OUTPUT_PATH ../Bin)

View File

@ -1721,7 +1721,7 @@ void Mob::AI_Event_Engaged(Mob* attacker, bool iYellForHelp) {
if(!CastToNPC()->GetCombatEvent() && GetHP() > 0)
{
parse->EventNPC(EVENT_COMBAT, CastToNPC(), attacker, "1", 0);
uint16 emoteid = CastToNPC()->GetNPCEmoteID();
uint16 emoteid = GetEmoteID();
if(emoteid != 0)
CastToNPC()->DoNPCEmote(ENTERCOMBAT,emoteid);
CastToNPC()->SetCombatEvent(true);
@ -1754,11 +1754,14 @@ void Mob::AI_Event_NoLongerEngaged() {
{
if(CastToNPC()->GetCombatEvent() && GetHP() > 0)
{
uint16 emoteid = CastToNPC()->GetNPCEmoteID();
if(entity_list.GetNPCByID(this->GetID()))
{
uint16 emoteid = CastToNPC()->GetEmoteID();
parse->EventNPC(EVENT_COMBAT, CastToNPC(), NULL, "0", 0);
if(emoteid != 0)
CastToNPC()->DoNPCEmote(LEAVECOMBAT,emoteid);
CastToNPC()->SetCombatEvent(false);
}
}
}
}

View File

@ -1451,7 +1451,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
{
if (killerMob->IsNPC()) {
parse->EventNPC(EVENT_SLAY, killerMob->CastToNPC(), this, "", 0);
uint16 emoteid = killerMob->CastToNPC()->GetNPCEmoteID();
uint16 emoteid = killerMob->GetEmoteID();
if(emoteid != 0)
killerMob->CastToNPC()->DoNPCEmote(KILLEDPC,emoteid);
killerMob->TrySpellOnKill(killed_level,spell);
@ -2209,7 +2209,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
this->CheckMinMaxLevel(killer);
}
entity_list.RemoveFromAutoXTargets(this);
uint16 emoteid = this->GetNPCEmoteID();
uint16 emoteid = this->GetEmoteID();
Corpse* corpse = new Corpse(this, &itemlist, GetNPCTypeID(), &NPCTypedata,level>54?RuleI(NPC,MajorNPCCorpseDecayTimeMS):RuleI(NPC,MinorNPCCorpseDecayTimeMS));
entity_list.LimitRemoveNPC(this);
entity_list.AddCorpse(corpse, this->GetID());
@ -2302,13 +2302,13 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
if(killerMob) {
Mob *oos = killerMob->GetOwnerOrSelf();
parse->EventNPC(EVENT_DEATH, this, oos, "", 0);
uint16 emoteid = this->GetNPCEmoteID();
uint16 emoteid = this->GetEmoteID();
if(emoteid != 0)
this->DoNPCEmote(ONDEATH,emoteid);
if(oos->IsNPC())
{
parse->EventNPC(EVENT_NPC_SLAY, oos->CastToNPC(), this, "", 0);
uint16 emoteid = oos->CastToNPC()->GetNPCEmoteID();
uint16 emoteid = oos->GetEmoteID();
if(emoteid != 0)
oos->CastToNPC()->DoNPCEmote(KILLEDNPC,emoteid);
killerMob->TrySpellOnKill(killed_level,spell);

View File

@ -5916,7 +5916,7 @@ void Client::CheckEmoteHail(Mob *target, const char* message)
{
return;
}
uint16 emoteid = target->CastToNPC()->GetNPCEmoteID();
uint16 emoteid = target->GetEmoteID();
if(emoteid != 0)
target->CastToNPC()->DoNPCEmote(HAILED,emoteid);
}

View File

@ -3540,7 +3540,6 @@ void Client::Handle_OP_WearChange(const EQApplicationPacket *app)
{
if (app->size != sizeof(WearChange_Struct)) {
cout << "Wrong size: OP_WearChange, size=" << app->size << ", expected " << sizeof(WearChange_Struct) << endl;
DumpPacket(app);
return;
}
@ -3595,7 +3594,6 @@ void Client::Handle_OP_WhoAllRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(Who_All_Struct)) {
cout << "Wrong size on OP_WhoAll. Got: " << app->size << ", Expected: " << sizeof(Who_All_Struct) << endl;
DumpPacket(app);
return;
}
Who_All_Struct* whoall = (Who_All_Struct*) app->pBuffer;
@ -6689,6 +6687,7 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
}
}
else if(memberToDisband->IsMerc()) {
memberToDisband->CastToMerc()->RemoveMercFromGroup(memberToDisband->CastToMerc(), group);
memberToDisband->CastToMerc()->RemoveMercFromGroup(memberToDisband->CastToMerc(), group);
memberToDisband->CastToMerc()->Suspend();
}
@ -7400,6 +7399,24 @@ void Client::Handle_OP_Emote(const EQApplicationPacket *app)
memcpy(out->message, name, len_name);
memcpy(&out->message[len_name], in->message, len_msg);
/*
if (target && target->IsClient()) {
entity_list.QueueCloseClients(this, outapp, false, 100, target);
cptr = outapp->pBuffer + 2;
// not sure if live does this or not. thought it was a nice feature, but would take a lot to
// clean up grammatical and other errors. Maybe with a regex parser...
replacestr((char *)cptr, target->GetName(), "you");
replacestr((char *)cptr, " he", " you");
replacestr((char *)cptr, " she", " you");
replacestr((char *)cptr, " him", " you");
replacestr((char *)cptr, " her", " you");
target->CastToClient()->QueuePacket(outapp);
}
else
*/
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FilterSocials);
safe_delete(outapp);

View File

@ -1307,7 +1307,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
uint64 value = 0, amount_to_take = 0, amount_to_add = 0;
int32 *from_bucket = 0, *to_bucket = 0;
Mob* trader = trade->With();
// could just do a range, but this is clearer and explicit
if
(

View File

@ -1867,7 +1867,7 @@ void command_npcstats(Client *c, const Seperator *sep)
c->Message(0, "Gender: %i Size: %f Bodytype: %d", c->GetTarget()->GetGender(), c->GetTarget()->GetSize(), c->GetTarget()->GetBodyType());
c->Message(0, "Runspeed: %f Walkspeed: %f", c->GetTarget()->GetRunspeed(), c->GetTarget()->GetWalkspeed());
c->Message(0, "Spawn Group: %i Grid: %i", c->GetTarget()->CastToNPC()->GetSp2(), c->GetTarget()->CastToNPC()->GetGrid());
c->Message(0, "EmoteID: %i", c->GetTarget()->CastToNPC()->GetNPCEmoteID());
c->Message(0, "EmoteID: %i", c->GetTarget()->CastToNPC()->GetEmoteID());
c->GetTarget()->CastToNPC()->QueryLoot(c);
}
}
@ -11031,7 +11031,7 @@ void command_emoteview(Client *c, const Seperator *sep)
if(c->GetTarget() && c->GetTarget()->IsNPC())
{
int count=0;
int emoteid = c->GetTarget()->CastToNPC()->GetNPCEmoteID();
int emoteid = c->GetTarget()->CastToNPC()->GetEmoteID();
LinkedListIterator<NPC_Emote_Struct*> iterator(zone->NPCEmoteList);
iterator.Reset();

View File

@ -148,7 +148,6 @@ void Doors::HandleClick(Client* sender, uint8 trigger)
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct));
MoveDoor_Struct* md = (MoveDoor_Struct*)outapp->pBuffer;
md->doorid = door_id;
/////////////////////////////////////////////////////////////////
//used_pawn: Locked doors! Rogue friendly too =)

View File

@ -621,7 +621,7 @@ void EntityList::AddNPC(NPC* npc, bool SendSpawnPacket, bool dontqueue) {
npc->SetID(GetFreeID());
parse->EventNPC(EVENT_SPAWN, npc, NULL, "", 0);
uint16 emoteid = npc->GetNPCEmoteID();
uint16 emoteid = npc->GetEmoteID();
if(emoteid != 0)
npc->DoNPCEmote(ONSPAWN,emoteid);

View File

@ -378,6 +378,8 @@ Mob::Mob(const char* in_name,
m_DisableMelee = false;
for (int i = 0; i < HIGHEST_SKILL+2; i++) { SkillDmgTaken_Mod[i] = 0; }
for (int i = 0; i < HIGHEST_RESIST+2; i++) { Vulnerability_Mod[i] = 0; }
emoteid = 0;
}
Mob::~Mob()
@ -1194,7 +1196,7 @@ void Mob::ShowStats(Client* client)
if(n->respawn2 != 0)
spawngroupid = n->respawn2->SpawnGroupID();
client->Message(0, " NPCID: %u SpawnGroupID: %u Grid: %i LootTable: %u FactionID: %i SpellsID: %u ", GetNPCTypeID(),spawngroupid, n->GetGrid(), n->GetLoottableID(), n->GetNPCFactionID(), n->GetNPCSpellsID());
client->Message(0, " Accuracy: %i MerchantID: %i EmoteID: %i Runspeed: %f Walkspeed: %f", n->GetAccuracyRating(), n->MerchantType, n->GetNPCEmoteID(), n->GetRunspeed(), n->GetWalkspeed());
client->Message(0, " Accuracy: %i MerchantID: %i EmoteID: %i Runspeed: %f Walkspeed: %f", n->GetAccuracyRating(), n->MerchantType, n->GetEmoteID(), n->GetRunspeed(), n->GetWalkspeed());
n->QueryLoot(client);
}
if (IsAIControlled()) {

View File

@ -784,6 +784,9 @@ public:
void TarGlobal(const char *varname, const char *value, const char *duration, int npcid, int charid, int zoneid);
void DelGlobal(const char *varname);
inline void SetEmoteID(uint16 emote) { emoteid = emote; }
inline uint16 GetEmoteID() { return emoteid; }
protected:
void CommonDamage(Mob* other, int32 &damage, const uint16 spell_id, const SkillType attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic);
static uint16 GetProcID(uint16 spell_id, uint8 effect_index);
@ -1110,6 +1113,7 @@ protected:
bool m_targetable;
int QGVarDuration(const char *fmt);
void InsertQuestGlobal(int charid, int npcid, int zoneid, const char *name, const char *value, int expdate);
uint16 emoteid;
private:
void _StopSong(); //this is not what you think it is

View File

@ -350,6 +350,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
guard_y_saved = 0;
guard_z_saved = 0;
guard_heading_saved = 0;
SetEmoteID(d->emoteid);
InitializeBuffSlots();
CalcBonuses();
}
@ -734,7 +735,7 @@ void NPC::DumpLoot(uint32 npcdump_index, ZSDump_NPC_Loot* npclootdump, uint32* N
}
void NPC::Depop(bool StartSpawnTimer) {
uint16 emoteid = this->GetNPCEmoteID();
uint16 emoteid = this->GetEmoteID();
if(emoteid != 0)
this->DoNPCEmote(ONDESPAWN,emoteid);
p_depop = true;

View File

@ -327,7 +327,6 @@ public:
//The corpse we make can only be looted by people who got credit for the kill
const bool HasPrivateCorpse() const { return NPCTypedata->private_corpse; }
const bool IsUnderwaterOnly() const { return NPCTypedata->underwater; }
const uint32 GetNPCEmoteID() const { return NPCTypedata->emoteid; }
const char* GetRawNPCTypeName() const { return NPCTypedata->name; }
bool GetDepop() { return p_depop; }

View File

@ -2559,7 +2559,6 @@ void Client::SendTaskFailed(int TaskID, int TaskIndex) {
tac->unknown5 = 0; // 0 for task complete or failed.
_log(TASKS__UPDATE, "TaskFailed");
_pkt(TASKS__PACKETS, outapp);
QueuePacket(outapp);

View File

@ -517,7 +517,6 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
outp->reply_code = 0x00000000; //success for finding it...
user->QueuePacket(outapp);
safe_delete(outapp);
@ -664,7 +663,6 @@ void Client::TradeskillSearchResults(const char *query, unsigned long qlen,
reply->recipe_id = recipe;
reply->trivial = trivial;
strn0cpy(reply->recipe_name, name, sizeof(reply->recipe_name));
FastQueuePacket(&outapp);
}
mysql_free_result(result);