Merge branch 'web_interface' of github.com:EQEmu/Server into web_interface

This commit is contained in:
KimLS
2014-07-20 14:35:54 -07:00
32 changed files with 6203 additions and 7 deletions
+12
View File
@@ -22,6 +22,7 @@
#include "worldserver.h"
#include "QuestParserCollection.h"
#include "../common/StringUtil.h"
#include "../common/web_interface_utils.h"
#include <sstream>
#include <math.h>
@@ -1216,6 +1217,17 @@ void Mob::MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct *spu){
spu->padding0014 =0x7f;
spu->padding0018 =0x5df27;
/* Testing */
if (IsNPC()){
std::string str = MakeJSON("ResponseType:PositionUpdate,entity:" + IntegerToString(GetID()) + ",x:" + FloatToString(x_pos) + ",y:" + FloatToString(y_pos) + ",z:" + FloatToString(z_pos) + ",h:" + FloatToString(heading));
char * writable = new char[str.size() + 1];
std::copy(str.begin(), str.end(), writable);
ServerPacket* wipack = new ServerPacket(ServerOP_WIWorldResponse, str.size() + 1);
wipack->WriteString(writable);
if (worldserver.Connected()) { worldserver.SendPacket(wipack); }
safe_delete(wipack);
delete[] writable;
}
}
// this is for SendPosUpdate()
+1 -1
View File
@@ -89,7 +89,7 @@ XS(XS_EntityList_GetMob)
if(THIS == nullptr)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetMob(name);
RETVAL = THIS->GetMob(name);
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Mob", (void*)RETVAL);
}
+5
View File
@@ -1777,6 +1777,11 @@ void WorldServer::Process() {
break;
}
case ServerOP_WIServGeneric:
{
/* Do Nothing for now */
break;
}
case ServerOP_CZSignalClient:
{
CZClientSignal_Struct* CZCS = (CZClientSignal_Struct*) pack->pBuffer;