Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2005, 08:21 PM
Dakaar
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default 6.2 bugfix: Special Attacks on pvp servers!

Hey folks, I started a thread in the support forum but I solved my own problem..... sooo here goes =P

The client does not send a special attack packet if the client does not see that it can attack a player. Ergo If you try to kick a person with a blue name on a pvp server, the client never even sends the packet.

As far as i know, we do not know the pvp value in the current spawn_struct

Hopefully a dev will come in and correct me, but untill then!

in entity.cpp:

change this function!

void EntityList::SendZoneSpawnsBulk(Client* client)
{
//float rate = client->Connection()->GetDataRate();
LinkedListIterator<Mob*> iterator(mob_list);
NewSpawn_Struct ns;
Mob *spawn;
int32 maxspawns=100;

//rate = rate > 1.0 ? (rate < 10.0 ? rate : 10.0) : 1.0;
//maxspawns = (int32)rate * SPAWNS_PER_POINT_DATARATE; // FYI > 10240 entities will cause BulkZoneSpawnPacket to throw exception
if(maxspawns > mob_list.Count())
maxspawns = mob_list.Count();
BulkZoneSpawnPacket* bzsp = new BulkZoneSpawnPacket(client, maxspawns);
for(iterator.Reset(); iterator.MoreElements(); iterator.Advance())
{
spawn = iterator.GetData();
if(spawn && spawn->InZone())
{
if(spawn->IsClient() && spawn->CastToClient()->GMHideMe(client))
continue;
memset(&ns, 0, sizeof(NewSpawn_Struct));
spawn->FillSpawnStruct(&ns, client);
bzsp->AddSpawn(&ns);
+ if(spawn->IsClient())
+ spawn->SendAppearancePacket(AT_PVP, spawn->CastToClient()->GetPVP(),true,true);

}
}
safe_delete(bzsp);
}

in client_packet.cpp around line 5794.
change the IsPVPZone() if statement to read like this:

if(zone->IsPVPZone())
SetPVP(true);

changing m_pp.pvp =1, to SetPVP(true);, this makes it so that your character appears red to itself.


Add also the change in the post below this one, and your players should be 'red' under all circumstances.

Peace

Last edited by Dakaar; 10-09-2005 at 05:00 AM..
Reply With Quote
  #2  
Old 10-08-2005, 08:37 PM
Dakaar
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

Simpler solution I ended up going with :

in mob.cpp


void Mob::CreateSpawnPacket(EQZonePacket* app, Mob* ForWho) {
app->SetOpcode(OP_NewSpawn);
app->size = sizeof(NewSpawn_Struct);
app->pBuffer = new uchar[app->size];
memset(app->pBuffer, 0, app->size);
NewSpawn_Struct* ns = (NewSpawn_Struct*)app->pBuffer;
FillSpawnStruct(ns, ForWho);
+if(IsClient())
+CastToClient()->SendAppearancePacket(AT_PVP,CastToClient()->GetPVP(),true,true);
}

This + the modified sendzonespawnsbulk() function will cover 100% of instances where a client is sent another client's spawn info.
Reply With Quote
  #3  
Old 10-19-2005, 08:47 AM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

That would be cool to have thoses PvP changes in the cvs codes, any chance?


Mag
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:46 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3