mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
+48
-48
@@ -104,7 +104,7 @@ int Client::GetAATimerID(aaID activate)
|
||||
|
||||
aa2 = zone->FindAA(a);
|
||||
|
||||
if(aa2 != NULL)
|
||||
if(aa2 != nullptr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ void Client::ActivateAA(aaID activate){
|
||||
|
||||
int AATimerID = GetAATimerID(activate);
|
||||
|
||||
SendAA_Struct* aa2 = NULL;
|
||||
SendAA_Struct* aa2 = nullptr;
|
||||
aaID aaid = activate;
|
||||
uint8 activate_val = GetAA(activate);
|
||||
//this wasn't taking into acct multi tiered act talents before...
|
||||
@@ -163,7 +163,7 @@ void Client::ActivateAA(aaID activate){
|
||||
break;
|
||||
|
||||
aa2 = zone->FindAA(a);
|
||||
if(aa2 != NULL)
|
||||
if(aa2 != nullptr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ void Client::ActivateAA(aaID activate){
|
||||
break;
|
||||
case aaTargetCurrent:
|
||||
case aaTargetCurrentGroup:
|
||||
if(GetTarget() == NULL) {
|
||||
if(GetTarget() == nullptr) {
|
||||
Message_StringID(MT_DefaultText, AA_NO_TARGET); //You must first select a target for this ability!
|
||||
p_timers.Clear(&database, AATimerID + pTimerAAStart);
|
||||
return;
|
||||
@@ -245,7 +245,7 @@ void Client::ActivateAA(aaID activate){
|
||||
target_id = GetTarget()->GetID();
|
||||
break;
|
||||
case aaTargetPet:
|
||||
if(GetPet() == NULL) {
|
||||
if(GetPet() == nullptr) {
|
||||
Message(0, "A pet is required for this skill.");
|
||||
return;
|
||||
}
|
||||
@@ -428,7 +428,7 @@ void Client::HandleAAAction(aaID activate) {
|
||||
}
|
||||
|
||||
case aaActionActOfValor:
|
||||
if(GetTarget() != NULL) {
|
||||
if(GetTarget() != nullptr) {
|
||||
int curhp = GetTarget()->GetHP();
|
||||
target = aaTargetCurrent;
|
||||
GetTarget()->HealDamage(curhp, this);
|
||||
@@ -514,7 +514,7 @@ void Client::HandleAAAction(aaID activate) {
|
||||
break;
|
||||
case aaTargetCurrent:
|
||||
case aaTargetCurrentGroup:
|
||||
if(GetTarget() == NULL) {
|
||||
if(GetTarget() == nullptr) {
|
||||
Message_StringID(MT_DefaultText, AA_NO_TARGET); //You must first select a target for this ability!
|
||||
p_timers.Clear(&database, timer_id + pTimerAAEffectStart);
|
||||
return;
|
||||
@@ -522,7 +522,7 @@ void Client::HandleAAAction(aaID activate) {
|
||||
target_id = GetTarget()->GetID();
|
||||
break;
|
||||
case aaTargetPet:
|
||||
if(GetPet() == NULL) {
|
||||
if(GetPet() == nullptr) {
|
||||
Message(0, "A pet is required for this skill.");
|
||||
return;
|
||||
}
|
||||
@@ -578,17 +578,17 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
|
||||
pet.npc_id = record.npc_type;
|
||||
|
||||
NPCType *made_npc = NULL;
|
||||
NPCType *made_npc = nullptr;
|
||||
|
||||
const NPCType *npc_type = database.GetNPCType(pet.npc_id);
|
||||
if(npc_type == NULL) {
|
||||
if(npc_type == nullptr) {
|
||||
//log write
|
||||
LogFile->write(EQEMuLog::Error, "Unknown npc type for swarm pet spell id: %d", spell_id);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(name_override != NULL) {
|
||||
if(name_override != nullptr) {
|
||||
//we have to make a custom NPC type for this name change
|
||||
made_npc = new NPCType;
|
||||
memcpy(made_npc, npc_type, sizeof(NPCType));
|
||||
@@ -617,14 +617,14 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
|
||||
//this is a little messy, but the only way to do it right
|
||||
//it would be possible to optimize out this copy for the last pet, but oh well
|
||||
NPCType *npc_dup = NULL;
|
||||
if(made_npc != NULL) {
|
||||
NPCType *npc_dup = nullptr;
|
||||
if(made_npc != nullptr) {
|
||||
npc_dup = new NPCType;
|
||||
memcpy(npc_dup, made_npc, sizeof(NPCType));
|
||||
}
|
||||
|
||||
NPC* npca = new NPC(
|
||||
(npc_dup!=NULL)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer
|
||||
(npc_dup!=nullptr)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer
|
||||
0,
|
||||
GetX()+swarm_pet_x[summon_count], GetY()+swarm_pet_y[summon_count],
|
||||
GetZ(), GetHeading(), FlyMode3);
|
||||
@@ -645,13 +645,13 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
npca->GetSwarmInfo()->owner_id = GetID();
|
||||
|
||||
//give the pets somebody to "love"
|
||||
if(targ != NULL){
|
||||
if(targ != nullptr){
|
||||
npca->AddToHateList(targ, 1000, 1000);
|
||||
npca->GetSwarmInfo()->target = targ->GetID();
|
||||
}
|
||||
|
||||
//we allocated a new NPC type object, give the NPC ownership of that memory
|
||||
if(npc_dup != NULL)
|
||||
if(npc_dup != nullptr)
|
||||
npca->GiveNPCTypeData(npc_dup);
|
||||
|
||||
entity_list.AddNPC(npca, true, true);
|
||||
@@ -659,7 +659,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
}
|
||||
|
||||
//the target of these swarm pets will take offense to being cast on...
|
||||
if(targ != NULL)
|
||||
if(targ != nullptr)
|
||||
targ->AddToHateList(this, 1, 0);
|
||||
}
|
||||
|
||||
@@ -671,17 +671,17 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
|
||||
|
||||
pet.npc_id = typesid;
|
||||
|
||||
NPCType *made_npc = NULL;
|
||||
NPCType *made_npc = nullptr;
|
||||
|
||||
const NPCType *npc_type = database.GetNPCType(typesid);
|
||||
if(npc_type == NULL) {
|
||||
if(npc_type == nullptr) {
|
||||
//log write
|
||||
LogFile->write(EQEMuLog::Error, "Unknown npc type for swarm pet type id: %d", typesid);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(name_override != NULL) {
|
||||
if(name_override != nullptr) {
|
||||
//we have to make a custom NPC type for this name change
|
||||
made_npc = new NPCType;
|
||||
memcpy(made_npc, npc_type, sizeof(NPCType));
|
||||
@@ -710,14 +710,14 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
|
||||
|
||||
//this is a little messy, but the only way to do it right
|
||||
//it would be possible to optimize out this copy for the last pet, but oh well
|
||||
NPCType *npc_dup = NULL;
|
||||
if(made_npc != NULL) {
|
||||
NPCType *npc_dup = nullptr;
|
||||
if(made_npc != nullptr) {
|
||||
npc_dup = new NPCType;
|
||||
memcpy(npc_dup, made_npc, sizeof(NPCType));
|
||||
}
|
||||
|
||||
NPC* npca = new NPC(
|
||||
(npc_dup!=NULL)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer
|
||||
(npc_dup!=nullptr)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer
|
||||
0,
|
||||
GetX()+swarm_pet_x[summon_count], GetY()+swarm_pet_y[summon_count],
|
||||
GetZ(), GetHeading(), FlyMode3);
|
||||
@@ -735,13 +735,13 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
|
||||
npca->GetSwarmInfo()->owner_id = GetID();
|
||||
|
||||
//give the pets somebody to "love"
|
||||
if(targ != NULL){
|
||||
if(targ != nullptr){
|
||||
npca->AddToHateList(targ, 1000, 1000);
|
||||
npca->GetSwarmInfo()->target = targ->GetID();
|
||||
}
|
||||
|
||||
//we allocated a new NPC type object, give the NPC ownership of that memory
|
||||
if(npc_dup != NULL)
|
||||
if(npc_dup != nullptr)
|
||||
npca->GiveNPCTypeData(npc_dup);
|
||||
|
||||
entity_list.AddNPC(npca, true, true);
|
||||
@@ -751,8 +751,8 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
|
||||
|
||||
void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration)
|
||||
{
|
||||
Corpse *CorpseToUse = NULL;
|
||||
CorpseToUse = entity_list.GetClosestCorpse(this, NULL);
|
||||
Corpse *CorpseToUse = nullptr;
|
||||
CorpseToUse = entity_list.GetClosestCorpse(this, nullptr);
|
||||
|
||||
if(!CorpseToUse)
|
||||
return;
|
||||
@@ -911,7 +911,7 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration)
|
||||
npca->GetSwarmInfo()->owner_id = GetID();
|
||||
|
||||
//give the pet somebody to "love"
|
||||
if(target != NULL){
|
||||
if(target != nullptr){
|
||||
npca->AddToHateList(target, 100000);
|
||||
npca->GetSwarmInfo()->target = target->GetID();
|
||||
}
|
||||
@@ -929,13 +929,13 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration)
|
||||
}
|
||||
|
||||
//we allocated a new NPC type object, give the NPC ownership of that memory
|
||||
if(make_npc != NULL)
|
||||
if(make_npc != nullptr)
|
||||
npca->GiveNPCTypeData(make_npc);
|
||||
|
||||
entity_list.AddNPC(npca, true, true);
|
||||
|
||||
//the target of these swarm pets will take offense to being cast on...
|
||||
if(target != NULL)
|
||||
if(target != nullptr)
|
||||
target->AddToHateList(this, 1, 0);
|
||||
}
|
||||
|
||||
@@ -1008,11 +1008,11 @@ void Client::BuyAA(AA_Action* action)
|
||||
break;
|
||||
mlog(AA__MESSAGE, "Could not find AA %d, trying potential parent %d", action->ability, a);
|
||||
aa2 = zone->FindAA(a);
|
||||
if(aa2 != NULL)
|
||||
if(aa2 != nullptr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(aa2 == NULL)
|
||||
if(aa2 == nullptr)
|
||||
return; //invalid ability...
|
||||
|
||||
if(aa2->special_category == 1 || aa2->special_category == 2)
|
||||
@@ -1104,7 +1104,7 @@ void Client::SendAATimers() {
|
||||
continue; //not an AA timer
|
||||
//send timer
|
||||
uaaout->begin = cur->GetStartTime();
|
||||
uaaout->end = static_cast<uint32>(time(NULL));
|
||||
uaaout->end = static_cast<uint32>(time(nullptr));
|
||||
uaaout->ability = cur->GetType() - pTimerAAStart; // uuaaout->ability is really a shared timer number
|
||||
QueuePacket(outapp);
|
||||
}
|
||||
@@ -1130,7 +1130,7 @@ void Client::SendAATable() {
|
||||
|
||||
void Client::SendPreviousAA(uint32 id, int seq){
|
||||
uint32 value=0;
|
||||
SendAA_Struct* saa2 = NULL;
|
||||
SendAA_Struct* saa2 = nullptr;
|
||||
if(id==0)
|
||||
saa2 = zone->GetAABySequence(seq);
|
||||
else
|
||||
@@ -1171,9 +1171,9 @@ void Client::SendPreviousAA(uint32 id, int seq){
|
||||
void Client::SendAA(uint32 id, int seq) {
|
||||
|
||||
uint32 value=0;
|
||||
SendAA_Struct* saa2 = NULL;
|
||||
SendAA_Struct* qaa = NULL;
|
||||
SendAA_Struct* saa_pp = NULL;
|
||||
SendAA_Struct* saa2 = nullptr;
|
||||
SendAA_Struct* qaa = nullptr;
|
||||
SendAA_Struct* saa_pp = nullptr;
|
||||
bool IsBaseLevel = true;
|
||||
bool aa_stack = false;
|
||||
|
||||
@@ -1318,7 +1318,7 @@ void Client::SendAA(uint32 id, int seq) {
|
||||
saa->next_id=saa->sof_next_id;
|
||||
|
||||
//Prevent removal of previous AA from window if next AA belongs to a higher client version.
|
||||
SendAA_Struct* saa_next = NULL;
|
||||
SendAA_Struct* saa_next = nullptr;
|
||||
saa_next = zone->FindAA(saa->sof_next_id);
|
||||
if (saa_next &&
|
||||
(((GetClientVersionBit() == 4) && (saa_next->clientver > 4))
|
||||
@@ -1442,7 +1442,7 @@ void Zone::LoadAAs() {
|
||||
totalAAs = database.CountAAs();
|
||||
if(totalAAs == 0) {
|
||||
LogFile->write(EQEMuLog::Error, "Failed to load AAs!");
|
||||
aas = NULL;
|
||||
aas = nullptr;
|
||||
return;
|
||||
}
|
||||
aas = new SendAA_Struct *[totalAAs];
|
||||
@@ -1472,7 +1472,7 @@ bool ZoneDatabase::LoadAAEffects2() {
|
||||
MYSQL_ROW row;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT aaid, slot, effectid, base1, base2 FROM aa_effects ORDER BY aaid ASC, slot ASC"), errbuf, &result)) {
|
||||
int count = 0;
|
||||
while((row = mysql_fetch_row(result))!= NULL) {
|
||||
while((row = mysql_fetch_row(result))!= nullptr) {
|
||||
int aaid = atoi(row[0]);
|
||||
int slot = atoi(row[1]);
|
||||
int effectid = atoi(row[2]);
|
||||
@@ -1621,7 +1621,7 @@ void Client::InspectBuffs(Client* Inspector, int Rank)
|
||||
if (spells[buffs[i].spellid].buffdurationformula == DF_Permanent)
|
||||
Inspector->Message(0, "%s (Permanent)", spells[buffs[i].spellid].name);
|
||||
else {
|
||||
char *TempString = NULL;
|
||||
char *TempString = nullptr;
|
||||
MakeAnyLenString(&TempString, "%.1f", static_cast<float>(buffs[i].ticsremaining) / 10.0f);
|
||||
Inspector->Message_StringID(0, BUFF_MINUTES_REMAINING, spells[buffs[i].spellid].name, TempString);
|
||||
safe_delete_array(TempString);
|
||||
@@ -1733,7 +1733,7 @@ void ZoneDatabase::FillAAEffects(SendAA_Struct* aa_struct){
|
||||
MYSQL_ROW row;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT effectid, base1, base2, slot from aa_effects where aaid=%i order by slot asc", aa_struct->id), errbuf, &result)) {
|
||||
int ndx=0;
|
||||
while((row = mysql_fetch_row(result))!=NULL) {
|
||||
while((row = mysql_fetch_row(result))!=nullptr) {
|
||||
aa_struct->abilities[ndx].skill_id=atoi(row[0]);
|
||||
aa_struct->abilities[ndx].base1=atoi(row[1]);
|
||||
aa_struct->abilities[ndx].base2=atoi(row[2]);
|
||||
@@ -1754,7 +1754,7 @@ uint32 ZoneDatabase::CountAAs(){
|
||||
MYSQL_ROW row;
|
||||
int count=0;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT count(title_sid) from altadv_vars"), errbuf, &result)) {
|
||||
if((row = mysql_fetch_row(result))!=NULL)
|
||||
if((row = mysql_fetch_row(result))!=nullptr)
|
||||
count = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
@@ -1771,7 +1771,7 @@ uint32 ZoneDatabase::CountAAEffects(){
|
||||
MYSQL_ROW row;
|
||||
int count=0;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT count(id) from aa_effects"), errbuf, &result)) {
|
||||
if((row = mysql_fetch_row(result))!=NULL){
|
||||
if((row = mysql_fetch_row(result))!=nullptr){
|
||||
count = atoi(row[0]);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
@@ -1798,7 +1798,7 @@ void ZoneDatabase::LoadAAs(SendAA_Struct **load){
|
||||
MYSQL_ROW row;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT skill_id from altadv_vars order by skill_id"), errbuf, &result)) {
|
||||
int skill=0,ndx=0;
|
||||
while((row = mysql_fetch_row(result))!=NULL) {
|
||||
while((row = mysql_fetch_row(result))!=nullptr) {
|
||||
skill=atoi(row[0]);
|
||||
load[ndx] = GetAASkillVars(skill);
|
||||
load[ndx]->seq = ndx+1;
|
||||
@@ -1815,7 +1815,7 @@ void ZoneDatabase::LoadAAs(SendAA_Struct **load){
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT skill_id, level, cost from aa_required_level_cost order by skill_id"), errbuf, &result))
|
||||
{
|
||||
AALevelCost_Struct aalcs;
|
||||
while((row = mysql_fetch_row(result))!=NULL)
|
||||
while((row = mysql_fetch_row(result))!=nullptr)
|
||||
{
|
||||
aalcs.Level = atoi(row[1]);
|
||||
aalcs.Cost = atoi(row[2]);
|
||||
@@ -1833,7 +1833,7 @@ SendAA_Struct* ZoneDatabase::GetAASkillVars(uint32 skill_id)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
SendAA_Struct* sendaa = NULL;
|
||||
SendAA_Struct* sendaa = nullptr;
|
||||
uchar* buffer;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SET @row = 0"), errbuf)) { //initialize "row" variable in database for next query
|
||||
safe_delete_array(query);
|
||||
@@ -1965,7 +1965,7 @@ AA_SwarmPetInfo::AA_SwarmPetInfo()
|
||||
{
|
||||
target = 0;
|
||||
owner_id = 0;
|
||||
duration = NULL;
|
||||
duration = nullptr;
|
||||
}
|
||||
|
||||
AA_SwarmPetInfo::~AA_SwarmPetInfo()
|
||||
|
||||
+16
-16
@@ -69,13 +69,13 @@ Map* Map::LoadMapfile(const char* in_zonename, const char *directory) {
|
||||
//are not all lower anymore, copy since strlwr edits the str.
|
||||
strn0cpy(zBuf, in_zonename, 64);
|
||||
|
||||
if(directory == NULL)
|
||||
if(directory == nullptr)
|
||||
directory = MAP_DIR;
|
||||
snprintf(cWork, 250, "%s/%s.map", directory, strlwr(zBuf));
|
||||
|
||||
if ((fp = fopen( cWork, "rb" ))) {
|
||||
ret = new Map();
|
||||
if(ret != NULL) {
|
||||
if(ret != nullptr) {
|
||||
ret->loadMap(fp);
|
||||
printf("Map %s loaded.\n", cWork);
|
||||
} else {
|
||||
@@ -100,9 +100,9 @@ Map::Map() {
|
||||
m_Faces = 0;
|
||||
m_Nodes = 0;
|
||||
m_FaceLists = 0;
|
||||
mFinalFaces = NULL;
|
||||
mNodes = NULL;
|
||||
mFaceLists = NULL;
|
||||
mFinalFaces = nullptr;
|
||||
mNodes = nullptr;
|
||||
mFaceLists = nullptr;
|
||||
}
|
||||
|
||||
bool Map::loadMap(FILE *fp) {
|
||||
@@ -261,19 +261,19 @@ printf(" Kids: %u, %u, %u, %u\n", _node->nodes[0], _node->nodes[1], _node->nodes
|
||||
printf(" Contained In Box: (%.2f -> %.2f, %.2f -> %.2f)\n", _node->minx, _node->maxx, _node->miny, _node->maxy);
|
||||
|
||||
/*printf(" Node found has children.\n");
|
||||
if(_node->node1 != NULL) {
|
||||
if(_node->node1 != nullptr) {
|
||||
printf("\tNode: (%.2f -> %.2f, %.2f -> %.2f)\n",
|
||||
_node->node1->minx, _node->node1->maxx, _node->node1->miny, _node->node1->maxy);
|
||||
}
|
||||
if(_node->node2 != NULL) {
|
||||
if(_node->node2 != nullptr) {
|
||||
printf("\tNode: (%.2f -> %.2f, %.2f -> %.2f)\n",
|
||||
_node->node2->minx, _node->node2->maxx, _node->node2->miny, _node->node2->maxy);
|
||||
}
|
||||
if(_node->node3 != NULL) {
|
||||
if(_node->node3 != nullptr) {
|
||||
printf("\tNode: (%.2f -> %.2f, %.2f -> %.2f)\n",
|
||||
_node->node3->minx, _node->node3->maxx, _node->node3->miny, _node->node3->maxy);
|
||||
}
|
||||
if(_node->node4 != NULL) {
|
||||
if(_node->node4 != nullptr) {
|
||||
printf("\tNode: (%.2f -> %.2f, %.2f -> %.2f)\n",
|
||||
_node->node4->minx, _node->node4->maxx, _node->node4->miny, _node->node4->maxy);
|
||||
}*/
|
||||
@@ -328,11 +328,11 @@ printf(" No node found.\n");
|
||||
// maybe precalc edges.
|
||||
int* Map::SeekFace( NodeRef node_r, float x, float y ) {
|
||||
if( node_r == NODE_NONE || node_r >= m_Nodes) {
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
}
|
||||
const PNODE _node = &mNodes[node_r];
|
||||
if(!(_node->flags & nodeFinal)) {
|
||||
return(NULL); //not a final node... could find the proper node...
|
||||
return(nullptr); //not a final node... could find the proper node...
|
||||
}
|
||||
|
||||
|
||||
@@ -483,7 +483,7 @@ bool Map::LineIntersectsNode( NodeRef node_r, VERTEX p1, VERTEX p2, VERTEX *resu
|
||||
continue; //watch for invalid lists, they seem to happen
|
||||
cur = &mFinalFaces[ *cfl ];
|
||||
if(LineIntersectsFace(cur,p1, p2, result)) {
|
||||
if(on != NULL)
|
||||
if(on != nullptr)
|
||||
*on = cur;
|
||||
return(true);
|
||||
}
|
||||
@@ -516,7 +516,7 @@ float Map::FindBestZ( NodeRef node_r, VERTEX p1, VERTEX *result, FACE **on) cons
|
||||
}
|
||||
|
||||
VERTEX tmp_result; //dummy placeholder if they do not ask for a result.
|
||||
if(result == NULL)
|
||||
if(result == nullptr)
|
||||
result = &tmp_result;
|
||||
|
||||
VERTEX p2(p1);
|
||||
@@ -554,7 +554,7 @@ printf("Start finding best Z...\n");
|
||||
printf("Found a z: %.2f\n", result->z);
|
||||
#endif
|
||||
if (result->z > best_z) {
|
||||
if(on != NULL)
|
||||
if(on != nullptr)
|
||||
*on = cur;
|
||||
best_z = result->z;
|
||||
}
|
||||
@@ -576,7 +576,7 @@ printf("Best Z found: %.2f\n", best_z);
|
||||
|
||||
|
||||
bool Map::LineIntersectsFace( PFACE cface, VERTEX p1, VERTEX p2, VERTEX *result) const {
|
||||
if( cface == NULL ) {
|
||||
if( cface == nullptr ) {
|
||||
return(false); //cant intersect a face we dont have... i guess
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ bool Map::LineIntersectsFace( PFACE cface, VERTEX p1, VERTEX p2, VERTEX *result)
|
||||
// FACE *thisface = &mFinalFaces[ _node->pfaces[ i ] ];
|
||||
|
||||
VERTEX *p = &intersect;
|
||||
if(result != NULL)
|
||||
if(result != nullptr)
|
||||
p = result;
|
||||
|
||||
// Calculate the parameters for the plane
|
||||
|
||||
+13
-13
@@ -222,7 +222,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) {
|
||||
case SpellType_Mez: {
|
||||
if(MakeRandomInt(0, 99) < 20)
|
||||
{
|
||||
Mob * mezTar = NULL;
|
||||
Mob * mezTar = nullptr;
|
||||
mezTar = entity_list.GetTargetForMez(this);
|
||||
|
||||
if(mezTar && mezTar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0)
|
||||
@@ -424,7 +424,7 @@ void Mob::AI_Init() {
|
||||
AIwalking_timer = 0;
|
||||
AImovement_timer = 0;
|
||||
AItarget_check_timer = 0;
|
||||
AIfeignremember_timer = NULL;
|
||||
AIfeignremember_timer = nullptr;
|
||||
AIscanarea_timer = 0;
|
||||
minLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMin);
|
||||
maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax);
|
||||
@@ -944,7 +944,7 @@ void Client::AI_Process()
|
||||
bool got_one = false;
|
||||
while(RememberedCharID != feign_memory_list.end()) {
|
||||
Client* remember_client = entity_list.GetClientByCharID(*RememberedCharID);
|
||||
if(remember_client == NULL) {
|
||||
if(remember_client == nullptr) {
|
||||
//they are gone now...
|
||||
tmp = RememberedCharID;
|
||||
RememberedCharID++;
|
||||
@@ -966,7 +966,7 @@ void Client::AI_Process()
|
||||
if(IsPet())
|
||||
{
|
||||
Mob* owner = GetOwner();
|
||||
if(owner == NULL)
|
||||
if(owner == nullptr)
|
||||
return;
|
||||
|
||||
float dist = DistNoRoot(*owner);
|
||||
@@ -1264,7 +1264,7 @@ void Mob::AI_Process() {
|
||||
AIwalking_timer->Start(100);
|
||||
pLastFightingDelayMoving = Timer::GetCurrentTime();
|
||||
return;
|
||||
} else if(tar != NULL) {
|
||||
} else if(tar != nullptr) {
|
||||
SetTarget(tar);
|
||||
return;
|
||||
}
|
||||
@@ -1326,7 +1326,7 @@ void Mob::AI_Process() {
|
||||
bool got_one = false;
|
||||
while(RememberedCharID != feign_memory_list.end()) {
|
||||
Client* remember_client = entity_list.GetClientByCharID(*RememberedCharID);
|
||||
if(remember_client == NULL) {
|
||||
if(remember_client == nullptr) {
|
||||
//they are gone now...
|
||||
tmp = RememberedCharID;
|
||||
RememberedCharID++;
|
||||
@@ -1378,7 +1378,7 @@ void Mob::AI_Process() {
|
||||
{
|
||||
|
||||
Mob* owner = GetOwner();
|
||||
if(owner == NULL)
|
||||
if(owner == nullptr)
|
||||
break;
|
||||
|
||||
//if(owner->IsClient())
|
||||
@@ -1579,7 +1579,7 @@ void NPC::AI_DoMovement() {
|
||||
//kick off event_waypoint depart
|
||||
char temp[16];
|
||||
sprintf(temp, "%d", cur_wp);
|
||||
parse->EventNPC(EVENT_WAYPOINT_DEPART, CastToNPC(), NULL, temp, 0);
|
||||
parse->EventNPC(EVENT_WAYPOINT_DEPART, CastToNPC(), nullptr, temp, 0);
|
||||
|
||||
//setup our next waypoint, if we are still on our normal grid
|
||||
//remember that the quest event above could have done anything it wanted with our grid
|
||||
@@ -1609,7 +1609,7 @@ void NPC::AI_DoMovement() {
|
||||
//kick off event_waypoint arrive
|
||||
char temp[16];
|
||||
sprintf(temp, "%d", cur_wp);
|
||||
parse->EventNPC(EVENT_WAYPOINT_ARRIVE, CastToNPC(), NULL, temp, 0);
|
||||
parse->EventNPC(EVENT_WAYPOINT_ARRIVE, CastToNPC(), nullptr, temp, 0);
|
||||
|
||||
// wipe feign memory since we reached our first waypoint
|
||||
if(cur_wp == 1)
|
||||
@@ -1684,7 +1684,7 @@ void NPC::AI_DoMovement() {
|
||||
ClearFeignMemory();
|
||||
moved=false;
|
||||
SetMoving(false);
|
||||
if (GetTarget() == NULL || DistNoRoot(*GetTarget()) >= 5*5 )
|
||||
if (GetTarget() == nullptr || DistNoRoot(*GetTarget()) >= 5*5 )
|
||||
{
|
||||
SetHeading(guard_heading);
|
||||
} else {
|
||||
@@ -1766,7 +1766,7 @@ void Mob::AI_Event_NoLongerEngaged() {
|
||||
if(entity_list.GetNPCByID(this->GetID()))
|
||||
{
|
||||
uint16 emoteid = CastToNPC()->GetEmoteID();
|
||||
parse->EventNPC(EVENT_COMBAT, CastToNPC(), NULL, "0", 0);
|
||||
parse->EventNPC(EVENT_COMBAT, CastToNPC(), nullptr, "0", 0);
|
||||
if(emoteid != 0)
|
||||
CastToNPC()->DoNPCEmote(LEAVECOMBAT,emoteid);
|
||||
CastToNPC()->SetCombatEvent(false);
|
||||
@@ -1873,7 +1873,7 @@ void Mob::StartEnrage()
|
||||
if (SpecAttackTimers[SPECATK_ENRAGE])
|
||||
{
|
||||
safe_delete(SpecAttackTimers[SPECATK_ENRAGE]);
|
||||
SpecAttackTimers[SPECATK_ENRAGE] = NULL;
|
||||
SpecAttackTimers[SPECATK_ENRAGE] = nullptr;
|
||||
}
|
||||
|
||||
if (!SpecAttackTimers[SPECATK_ENRAGE])
|
||||
@@ -2156,7 +2156,7 @@ void NPC::CheckSignal() {
|
||||
char buf[32];
|
||||
snprintf(buf, 31, "%d", signal_id);
|
||||
buf[31] = '\0';
|
||||
parse->EventNPC(EVENT_SIGNAL, this, NULL, buf, 0);
|
||||
parse->EventNPC(EVENT_SIGNAL, this, nullptr, buf, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+34
-34
@@ -43,15 +43,15 @@ Object::Object(uint32 id, uint32 type, uint32 icon, const Object_Struct& object,
|
||||
: respawn_timer(0), decay_timer(300000)
|
||||
{
|
||||
|
||||
user = NULL;
|
||||
last_user = NULL;
|
||||
user = nullptr;
|
||||
last_user = nullptr;
|
||||
|
||||
// Initialize members
|
||||
m_id = id;
|
||||
m_type = type;
|
||||
m_icon = icon;
|
||||
m_inuse = false;
|
||||
m_inst = NULL;
|
||||
m_inst = nullptr;
|
||||
m_ground_spawn=false;
|
||||
// Copy object data
|
||||
memcpy(&m_data, &object, sizeof(Object_Struct));
|
||||
@@ -72,14 +72,14 @@ Object::Object(const ItemInst* inst, char* name,float max_x,float min_x,float ma
|
||||
: respawn_timer(respawntimer), decay_timer(300000)
|
||||
{
|
||||
|
||||
user = NULL;
|
||||
last_user = NULL;
|
||||
user = nullptr;
|
||||
last_user = nullptr;
|
||||
m_max_x=max_x;
|
||||
m_max_y=max_y;
|
||||
m_min_x=min_x;
|
||||
m_min_y=min_y;
|
||||
m_id = 0;
|
||||
m_inst = (inst) ? inst->Clone() : NULL;
|
||||
m_inst = (inst) ? inst->Clone() : nullptr;
|
||||
m_type = OT_DROPPEDITEM;
|
||||
m_icon = 0;
|
||||
m_inuse = false;
|
||||
@@ -105,12 +105,12 @@ Object::Object(const ItemInst* inst, char* name,float max_x,float min_x,float ma
|
||||
Object::Object(Client* client, const ItemInst* inst)
|
||||
: respawn_timer(0), decay_timer(300000)
|
||||
{
|
||||
user = NULL;
|
||||
last_user = NULL;
|
||||
user = nullptr;
|
||||
last_user = nullptr;
|
||||
|
||||
// Initialize members
|
||||
m_id = 0;
|
||||
m_inst = (inst) ? inst->Clone() : NULL;
|
||||
m_inst = (inst) ? inst->Clone() : nullptr;
|
||||
m_type = OT_DROPPEDITEM;
|
||||
m_icon = 0;
|
||||
m_inuse = false;
|
||||
@@ -159,12 +159,12 @@ Object::Object(Client* client, const ItemInst* inst)
|
||||
Object::Object(const ItemInst *inst, float x, float y, float z, float heading, uint32 decay_time)
|
||||
: respawn_timer(0), decay_timer(decay_time)
|
||||
{
|
||||
user = NULL;
|
||||
last_user = NULL;
|
||||
user = nullptr;
|
||||
last_user = nullptr;
|
||||
|
||||
// Initialize members
|
||||
m_id = 0;
|
||||
m_inst = (inst) ? inst->Clone() : NULL;
|
||||
m_inst = (inst) ? inst->Clone() : nullptr;
|
||||
m_type = OT_DROPPEDITEM;
|
||||
m_icon = 0;
|
||||
m_inuse = false;
|
||||
@@ -215,14 +215,14 @@ Object::Object(const ItemInst *inst, float x, float y, float z, float heading, u
|
||||
Object::Object(const char *model, float x, float y, float z, float heading, uint8 type, uint32 decay_time)
|
||||
: respawn_timer(0), decay_timer(decay_time)
|
||||
{
|
||||
user = NULL;
|
||||
last_user = NULL;
|
||||
ItemInst* inst = NULL;
|
||||
user = nullptr;
|
||||
last_user = nullptr;
|
||||
ItemInst* inst = nullptr;
|
||||
inst = new ItemInst(ItemUseWorldContainer);
|
||||
|
||||
// Initialize members
|
||||
m_id = 0;
|
||||
m_inst = (inst) ? inst->Clone() : NULL;
|
||||
m_inst = (inst) ? inst->Clone() : nullptr;
|
||||
m_type = type;
|
||||
m_icon = 0;
|
||||
m_inuse = false;
|
||||
@@ -254,8 +254,8 @@ Object::Object(const char *model, float x, float y, float z, float heading, uint
|
||||
Object::~Object()
|
||||
{
|
||||
safe_delete(m_inst);
|
||||
if(user != NULL) {
|
||||
user->SetTradeskillObject(NULL);
|
||||
if(user != nullptr) {
|
||||
user->SetTradeskillObject(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,27 +341,27 @@ void Object::PutItem(uint8 index, const ItemInst* inst)
|
||||
|
||||
void Object::Close() {
|
||||
m_inuse = false;
|
||||
if(user != NULL)
|
||||
if(user != nullptr)
|
||||
{
|
||||
last_user = user;
|
||||
// put any remaining items from the world container back into the player's inventory to avoid item loss
|
||||
// if they close the container without removing all items
|
||||
ItemInst* container = this->m_inst;
|
||||
if(container != NULL)
|
||||
if(container != nullptr)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ITEMS_PER_BAG; i++)
|
||||
{
|
||||
ItemInst* inst = container->PopItem(i);
|
||||
if(inst != NULL)
|
||||
if(inst != nullptr)
|
||||
{
|
||||
user->MoveItemToInventory(inst, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
user->SetTradeskillObject(NULL);
|
||||
user->SetTradeskillObject(nullptr);
|
||||
}
|
||||
user = NULL;
|
||||
user = nullptr;
|
||||
}
|
||||
|
||||
// Remove item from container
|
||||
@@ -378,7 +378,7 @@ void Object::DeleteItem(uint8 index)
|
||||
// Pop item out of container
|
||||
ItemInst* Object::PopItem(uint8 index)
|
||||
{
|
||||
ItemInst* inst = NULL;
|
||||
ItemInst* inst = nullptr;
|
||||
|
||||
if (m_inst && m_inst->IsType(ItemClassContainer)) {
|
||||
inst = m_inst->PopItem(index);
|
||||
@@ -415,7 +415,7 @@ bool Object::Process(){
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ClickObject, sizeof(ClickObject_Struct));
|
||||
ClickObject_Struct* click_object = (ClickObject_Struct*)outapp->pBuffer;
|
||||
click_object->drop_id = GetID();
|
||||
entity_list.QueueClients(NULL, outapp, false);
|
||||
entity_list.QueueClients(nullptr, outapp, false);
|
||||
safe_delete(outapp);
|
||||
|
||||
// Remove object
|
||||
@@ -440,7 +440,7 @@ void Object::RandomSpawn(bool send_packet) {
|
||||
if(send_packet) {
|
||||
EQApplicationPacket app;
|
||||
CreateSpawnPacket(&app);
|
||||
entity_list.QueueClients(NULL, &app, true);
|
||||
entity_list.QueueClients(nullptr, &app, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,14 +478,14 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
||||
safe_delete(m_inst);
|
||||
|
||||
// No longer using a tradeskill object
|
||||
sender->SetTradeskillObject(NULL);
|
||||
user = NULL;
|
||||
sender->SetTradeskillObject(nullptr);
|
||||
user = nullptr;
|
||||
}
|
||||
|
||||
// Send click to all clients (removes entity on client)
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ClickObject, sizeof(ClickObject_Struct));
|
||||
memcpy(outapp->pBuffer, click_object, sizeof(ClickObject_Struct));
|
||||
entity_list.QueueClients(NULL, outapp, false);
|
||||
entity_list.QueueClients(nullptr, outapp, false);
|
||||
safe_delete(outapp);
|
||||
|
||||
// Remove object
|
||||
@@ -499,7 +499,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
||||
|
||||
//TODO: there is prolly a better way to do this.
|
||||
//if this is not the main user, send them a close and a message
|
||||
if(user == NULL || user == sender)
|
||||
if(user == nullptr || user == sender)
|
||||
coa->open = 0x01;
|
||||
else {
|
||||
coa->open = 0x00;
|
||||
@@ -523,7 +523,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
||||
safe_delete(outapp);
|
||||
|
||||
//if the object allready had a user, we are done
|
||||
if(user != NULL)
|
||||
if(user != nullptr)
|
||||
return(false);
|
||||
|
||||
// Starting to use this object
|
||||
@@ -583,7 +583,7 @@ uint32 ZoneDatabase::AddObject(uint32 type, uint32 icon, const Object_Struct& ob
|
||||
item_id, charges, object_name, type, icon);
|
||||
|
||||
// Save new record for object
|
||||
if (!RunQuery(query, len_query, errbuf, NULL, NULL, &database_id)) {
|
||||
if (!RunQuery(query, len_query, errbuf, nullptr, nullptr, &database_id)) {
|
||||
LogFile->write(EQEMuLog::Error, "Unable to insert object: %s", errbuf);
|
||||
}
|
||||
else {
|
||||
@@ -926,14 +926,14 @@ void Object::SetEntityVariable(const char *id, const char *m_var)
|
||||
const char* Object::GetEntityVariable(const char *id)
|
||||
{
|
||||
if(!id)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
std::map<std::string, std::string>::iterator iter = o_EntityVariables.find(id);
|
||||
if(iter != o_EntityVariables.end())
|
||||
{
|
||||
return iter->second.c_str();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool Object::EntityVariableExists(const char * id)
|
||||
|
||||
@@ -872,7 +872,7 @@ void Corpse::AllowMobLoot(Mob *them, uint8 slot)
|
||||
{
|
||||
if(slot >= MAX_LOOTERS)
|
||||
return;
|
||||
if(them == NULL || !them->IsClient())
|
||||
if(them == nullptr || !them->IsClient())
|
||||
return;
|
||||
|
||||
looters[slot] = them->CastToClient()->CharacterID();
|
||||
@@ -1110,7 +1110,7 @@ void Corpse::LootItem(Client* client, const EQApplicationPacket* app)
|
||||
}
|
||||
const Item_Struct* item = 0;
|
||||
ItemInst *inst = 0;
|
||||
ServerLootItem_Struct* item_data = NULL, *bag_item_data[10];
|
||||
ServerLootItem_Struct* item_data = nullptr, *bag_item_data[10];
|
||||
|
||||
memset(bag_item_data, 0, sizeof(bag_item_data));
|
||||
if(GetPKItem()>1)
|
||||
@@ -1267,11 +1267,11 @@ void Corpse::LootItem(Client* client, const EQApplicationPacket* app)
|
||||
client->Message_StringID(MT_LootMessages, LOOTED_MESSAGE, link);
|
||||
if(!IsPlayerCorpse()) {
|
||||
Group *g = client->GetGroup();
|
||||
if(g != NULL) {
|
||||
if(g != nullptr) {
|
||||
g->GroupMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE, client->GetName(), link);
|
||||
} else {
|
||||
Raid *r = client->GetRaid();
|
||||
if(r != NULL) {
|
||||
if(r != nullptr) {
|
||||
r->RaidMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE, client->GetName(), link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ QuestInterface *QuestParserCollection::GetQIByNPCQuest(uint32 npcid) {
|
||||
filename += "/";
|
||||
filename += itoa(npcid);
|
||||
std::string tmp;
|
||||
FILE *f = NULL;
|
||||
FILE *f = nullptr;
|
||||
|
||||
std::list<QuestInterface*>::iterator iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@@ -295,7 +295,7 @@ QuestInterface *QuestParserCollection::GetQIByNPCQuest(uint32 npcid) {
|
||||
//second look for /quests/zone/npcname.ext (precedence)
|
||||
const NPCType *npc_type = database.GetNPCType(npcid);
|
||||
if(!npc_type) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
std::string npc_name = npc_type->name;
|
||||
int sz = static_cast<int>(npc_name.length());
|
||||
@@ -405,13 +405,13 @@ QuestInterface *QuestParserCollection::GetQIByNPCQuest(uint32 npcid) {
|
||||
iter++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QuestInterface *QuestParserCollection::GetQIByPlayerQuest() {
|
||||
|
||||
if(!zone)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
//first look for /quests/zone/player_v[instance_version].ext (precedence)
|
||||
std::string filename = "quests/";
|
||||
@@ -420,7 +420,7 @@ QuestInterface *QuestParserCollection::GetQIByPlayerQuest() {
|
||||
filename += "player_v";
|
||||
filename += itoa(zone->GetInstanceVersion());
|
||||
std::string tmp;
|
||||
FILE *f = NULL;
|
||||
FILE *f = nullptr;
|
||||
|
||||
std::list<QuestInterface*>::iterator iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@@ -478,7 +478,7 @@ QuestInterface *QuestParserCollection::GetQIByPlayerQuest() {
|
||||
iter++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QuestInterface *QuestParserCollection::GetQIByGlobalNPCQuest(){
|
||||
@@ -488,7 +488,7 @@ QuestInterface *QuestParserCollection::GetQIByGlobalNPCQuest(){
|
||||
filename += "/";
|
||||
filename += "global_npc";
|
||||
std::string tmp;
|
||||
FILE *f = NULL;
|
||||
FILE *f = nullptr;
|
||||
|
||||
std::list<QuestInterface*>::iterator iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@@ -505,7 +505,7 @@ QuestInterface *QuestParserCollection::GetQIByGlobalNPCQuest(){
|
||||
iter++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QuestInterface *QuestParserCollection::GetQIByGlobalPlayerQuest() {
|
||||
@@ -515,7 +515,7 @@ QuestInterface *QuestParserCollection::GetQIByGlobalPlayerQuest() {
|
||||
filename += "/";
|
||||
filename += "global_player";
|
||||
std::string tmp;
|
||||
FILE *f = NULL;
|
||||
FILE *f = nullptr;
|
||||
|
||||
std::list<QuestInterface*>::iterator iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@@ -532,7 +532,7 @@ QuestInterface *QuestParserCollection::GetQIByGlobalPlayerQuest() {
|
||||
iter++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QuestInterface *QuestParserCollection::GetQIBySpellQuest(uint32 spell_id) {
|
||||
@@ -540,7 +540,7 @@ QuestInterface *QuestParserCollection::GetQIBySpellQuest(uint32 spell_id) {
|
||||
std::string filename = "quests/spells/";
|
||||
filename += itoa(spell_id);
|
||||
std::string tmp;
|
||||
FILE *f = NULL;
|
||||
FILE *f = nullptr;
|
||||
|
||||
std::list<QuestInterface*>::iterator iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@@ -557,7 +557,7 @@ QuestInterface *QuestParserCollection::GetQIBySpellQuest(uint32 spell_id) {
|
||||
iter++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QuestInterface *QuestParserCollection::GetQIByItemQuest(std::string item_script) {
|
||||
@@ -565,7 +565,7 @@ QuestInterface *QuestParserCollection::GetQIByItemQuest(std::string item_script)
|
||||
std::string filename = "quests/items/";
|
||||
filename += item_script;
|
||||
std::string tmp;
|
||||
FILE *f = NULL;
|
||||
FILE *f = nullptr;
|
||||
|
||||
std::list<QuestInterface*>::iterator iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@@ -582,5 +582,5 @@ QuestInterface *QuestParserCollection::GetQIByItemQuest(std::string item_script)
|
||||
iter++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,5 +18,5 @@
|
||||
#include "../common/debug.h"
|
||||
#include "ZoneConfig.h"
|
||||
|
||||
ZoneConfig *ZoneConfig::_zone_config = NULL;
|
||||
ZoneConfig *ZoneConfig::_zone_config = nullptr;
|
||||
|
||||
|
||||
+2
-2
@@ -37,14 +37,14 @@ class ZoneConfig : public EQEmuConfig {
|
||||
|
||||
// Produce a const singleton
|
||||
static const ZoneConfig *get() {
|
||||
if (_zone_config == NULL)
|
||||
if (_zone_config == nullptr)
|
||||
LoadConfig();
|
||||
return(_zone_config);
|
||||
}
|
||||
|
||||
// Load the config
|
||||
static bool LoadConfig() {
|
||||
if (_zone_config != NULL)
|
||||
if (_zone_config != nullptr)
|
||||
delete _zone_config;
|
||||
_zone_config=new ZoneConfig;
|
||||
_config=_zone_config;
|
||||
|
||||
+14
-14
@@ -63,7 +63,7 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
|
||||
bool engaged = from_who->IsEngaged();
|
||||
if(engaged) {
|
||||
Mob *top = from_who->GetHateTop();
|
||||
towho->Message(0, ".. I am currently fighting with %s", top == NULL?"(NULL)":top->GetName());
|
||||
towho->Message(0, ".. I am currently fighting with %s", top == nullptr?"(nullptr)":top->GetName());
|
||||
}
|
||||
bool check_npcs = from_who->WillAggroNPCs();
|
||||
|
||||
@@ -72,7 +72,7 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
|
||||
|
||||
int my_primary = from_who->GetPrimaryFaction();
|
||||
Mob *own = from_who->GetOwner();
|
||||
if(own != NULL)
|
||||
if(own != nullptr)
|
||||
my_primary = own->GetPrimaryFaction();
|
||||
|
||||
if(my_primary == 0) {
|
||||
@@ -173,10 +173,10 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
||||
int my_primary = GetPrimaryFaction();
|
||||
int mob_primary = mob->GetPrimaryFaction();
|
||||
Mob *own = GetOwner();
|
||||
if(own != NULL)
|
||||
if(own != nullptr)
|
||||
my_primary = own->GetPrimaryFaction();
|
||||
own = mob->GetOwner();
|
||||
if(mob_primary > 0 && own != NULL)
|
||||
if(mob_primary > 0 && own != nullptr)
|
||||
mob_primary = own->GetPrimaryFaction();
|
||||
|
||||
if(mob_primary == 0) {
|
||||
@@ -220,7 +220,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
||||
if(!(
|
||||
fv == FACTION_SCOWLS
|
||||
||
|
||||
(mob->GetPrimaryFaction() != GetPrimaryFaction() && mob->GetPrimaryFaction() == -4 && GetOwner() == NULL)
|
||||
(mob->GetPrimaryFaction() != GetPrimaryFaction() && mob->GetPrimaryFaction() == -4 && GetOwner() == nullptr)
|
||||
||
|
||||
fv == FACTION_THREATENLY
|
||||
)) {
|
||||
@@ -335,7 +335,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
||||
(
|
||||
fv == FACTION_SCOWLS
|
||||
||
|
||||
(mob->GetPrimaryFaction() != GetPrimaryFaction() && mob->GetPrimaryFaction() == -4 && GetOwner() == NULL)
|
||||
(mob->GetPrimaryFaction() != GetPrimaryFaction() && mob->GetPrimaryFaction() == -4 && GetOwner() == nullptr)
|
||||
||
|
||||
(
|
||||
fv == FACTION_THREATENLY
|
||||
@@ -368,7 +368,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
||||
|
||||
Mob* EntityList::AICheckCloseAggro(Mob* sender, float iAggroRange, float iAssistRange) {
|
||||
if (!sender || !sender->IsNPC())
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
_ZP(EntityList_AICheckCloseAggro);
|
||||
|
||||
#ifdef REVERSE_AGGRO
|
||||
@@ -389,7 +389,7 @@ Mob* EntityList::AICheckCloseAggro(Mob* sender, float iAggroRange, float iAssist
|
||||
iterator.Advance();
|
||||
}
|
||||
//LogFile->write(EQEMuLog::Debug, "Check aggro for %s no target.", sender->GetName());
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
int EntityList::GetHatedCount(Mob *attacker, Mob *exclude) {
|
||||
@@ -1026,7 +1026,7 @@ bool Mob::CheckLosFN(Mob* other) {
|
||||
}
|
||||
|
||||
bool Mob::CheckLosFN(float posX, float posY, float posZ, float mobSize) {
|
||||
if(zone->zonemap == NULL) {
|
||||
if(zone->zonemap == nullptr) {
|
||||
//not sure what the best return is on error
|
||||
//should make this a database variable, but im lazy today
|
||||
#ifdef LOS_DEFAULT_CAN_SEE
|
||||
@@ -1405,20 +1405,20 @@ int32 Mob::CheckHealAggroAmount(uint16 spellid, uint32 heal_possible) {
|
||||
}
|
||||
|
||||
void Mob::AddFeignMemory(Client* attacker) {
|
||||
if(feign_memory_list.empty() && AIfeignremember_timer != NULL)
|
||||
if(feign_memory_list.empty() && AIfeignremember_timer != nullptr)
|
||||
AIfeignremember_timer->Start(AIfeignremember_delay);
|
||||
feign_memory_list.insert(attacker->CharacterID());
|
||||
}
|
||||
|
||||
void Mob::RemoveFromFeignMemory(Client* attacker) {
|
||||
feign_memory_list.erase(attacker->CharacterID());
|
||||
if(feign_memory_list.empty() && AIfeignremember_timer != NULL)
|
||||
if(feign_memory_list.empty() && AIfeignremember_timer != nullptr)
|
||||
AIfeignremember_timer->Disable();
|
||||
if(feign_memory_list.empty())
|
||||
{
|
||||
minLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMin);
|
||||
maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax);
|
||||
if(AIfeignremember_timer != NULL)
|
||||
if(AIfeignremember_timer != nullptr)
|
||||
AIfeignremember_timer->Disable();
|
||||
}
|
||||
}
|
||||
@@ -1428,7 +1428,7 @@ void Mob::ClearFeignMemory() {
|
||||
while (RememberedCharID != feign_memory_list.end())
|
||||
{
|
||||
Client* remember_client = entity_list.GetClientByCharID(*RememberedCharID);
|
||||
if(remember_client != NULL) //Still in zone
|
||||
if(remember_client != nullptr) //Still in zone
|
||||
remember_client->RemoveXTarget(this, false);
|
||||
++RememberedCharID;
|
||||
}
|
||||
@@ -1436,7 +1436,7 @@ void Mob::ClearFeignMemory() {
|
||||
feign_memory_list.clear();
|
||||
minLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMin);
|
||||
maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax);
|
||||
if(AIfeignremember_timer != NULL)
|
||||
if(AIfeignremember_timer != nullptr)
|
||||
AIfeignremember_timer->Disable();
|
||||
}
|
||||
|
||||
|
||||
+43
-42
@@ -1099,7 +1099,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
_ZP(Client_Attack);
|
||||
|
||||
if (!other) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Client::Attack() for evaluation!");
|
||||
return false;
|
||||
}
|
||||
@@ -1107,12 +1107,12 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
if(!GetTarget())
|
||||
SetTarget(other);
|
||||
|
||||
mlog(COMBAT__ATTACKS, "Attacking %s with hand %d %s", other?other->GetName():"(NULL)", Hand, bRiposte?"(this is a riposte)":"");
|
||||
mlog(COMBAT__ATTACKS, "Attacking %s with hand %d %s", other?other->GetName():"(nullptr)", Hand, bRiposte?"(this is a riposte)":"");
|
||||
|
||||
//SetAttackTimer();
|
||||
if (
|
||||
(IsCasting() && GetClass() != BARD && !IsFromSpell)
|
||||
|| other == NULL
|
||||
|| other == nullptr
|
||||
|| ((IsClient() && CastToClient()->dead) || (other->IsClient() && other->CastToClient()->dead))
|
||||
|| (GetHP() < 0)
|
||||
|| (!IsAttackAllowed(other))
|
||||
@@ -1140,7 +1140,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
OffHandAtk(false);
|
||||
}
|
||||
|
||||
if(weapon != NULL) {
|
||||
if(weapon != nullptr) {
|
||||
if (!weapon->IsWeapon()) {
|
||||
mlog(COMBAT__ATTACKS, "Attack canceled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
||||
return(false);
|
||||
@@ -1210,7 +1210,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
// Damage bonuses apply only to hits from the main hand (Hand == 13) by characters level 28 and above
|
||||
// who belong to a melee class. If we're here, then all of these conditions apply.
|
||||
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) NULL );
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) nullptr );
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -1221,7 +1221,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
if (Hand==14) {
|
||||
if (aabonuses.SecondaryDmgInc || itembonuses.SecondaryDmgInc || spellbonuses.SecondaryDmgInc){
|
||||
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) NULL );
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) nullptr );
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -1474,7 +1474,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
||||
|
||||
parse->EventPlayer(EVENT_DEATH, this, "", 0);
|
||||
|
||||
if (killerMob != NULL)
|
||||
if (killerMob != nullptr)
|
||||
{
|
||||
if (killerMob->IsNPC()) {
|
||||
parse->EventNPC(EVENT_SLAY, killerMob->CastToNPC(), this, "", 0);
|
||||
@@ -1512,6 +1512,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
||||
|
||||
entity_list.RemoveFromTargets(this);
|
||||
hate_list.RemoveEnt(this);
|
||||
RemoveAutoXTargets();
|
||||
|
||||
|
||||
//remove ourself from all proximities
|
||||
@@ -1596,7 +1597,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
||||
|
||||
char tmp[20];
|
||||
database.GetVariable("ServerType", tmp, 9);
|
||||
if(atoi(tmp)==1 && killerMob != NULL && killerMob->IsClient()){
|
||||
if(atoi(tmp)==1 && killerMob != nullptr && killerMob->IsClient()){
|
||||
char tmp2[10] = {0};
|
||||
database.GetVariable("PvPreward", tmp, 9);
|
||||
int reward = atoi(tmp);
|
||||
@@ -1618,7 +1619,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
||||
{
|
||||
for(int i=0;i<6;i++)
|
||||
{
|
||||
if(group->members[i] != NULL)
|
||||
if(group->members[i] != nullptr)
|
||||
{
|
||||
new_corpse->AllowMobLoot(group->members[i],i);
|
||||
}
|
||||
@@ -1647,7 +1648,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
||||
#if 0 // solar: commenting this out for now TODO reimplement becomenpc stuff
|
||||
if (IsBecomeNPC() == true)
|
||||
{
|
||||
if (killerMob != NULL && killerMob->IsClient()) {
|
||||
if (killerMob != nullptr && killerMob->IsClient()) {
|
||||
if (killerMob->CastToClient()->isgrouped && entity_list.GetGroupByMob(killerMob) != 0)
|
||||
entity_list.GetGroupByMob(killerMob->CastToClient())->SplitExp((uint32)(level*level*75*3.5f), this);
|
||||
|
||||
@@ -1667,7 +1668,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
||||
Group* group = entity_list.GetGroupByClient(killerMob->CastToClient());
|
||||
if(group != 0) {
|
||||
for(int i=0; i < MAX_GROUP_MEMBERS; i++) { // Doesnt work right, needs work
|
||||
if(group->members[i] != NULL) {
|
||||
if(group->members[i] != nullptr) {
|
||||
corpse->AllowMobLoot(group->members[i],i);
|
||||
}
|
||||
}
|
||||
@@ -1726,7 +1727,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
int damage = 0;
|
||||
|
||||
if (!other) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to NPC::Attack() for evaluation!");
|
||||
return false;
|
||||
}
|
||||
@@ -1763,7 +1764,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
}
|
||||
|
||||
//figure out what weapon they are using, if any
|
||||
const Item_Struct* weapon = NULL;
|
||||
const Item_Struct* weapon = nullptr;
|
||||
if (Hand == 13 && equipment[SLOT_PRIMARY] > 0)
|
||||
weapon = database.GetItem(equipment[SLOT_PRIMARY]);
|
||||
else if (equipment[SLOT_SECONDARY])
|
||||
@@ -1977,7 +1978,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
TryWeaponProc(weapon, other, Hand); //no weapon
|
||||
}
|
||||
|
||||
TriggerDefensiveProcs(NULL, other, Hand, damage);
|
||||
TriggerDefensiveProcs(nullptr, other, Hand, damage);
|
||||
|
||||
// now check ripostes
|
||||
if (damage == -3) { // riposting
|
||||
@@ -2082,7 +2083,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
|
||||
Mob *give_exp = hate_list.GetDamageTop(this);
|
||||
|
||||
if(give_exp == NULL)
|
||||
if(give_exp == nullptr)
|
||||
give_exp = killer;
|
||||
|
||||
if(give_exp && give_exp->HasOwner()) {
|
||||
@@ -2097,14 +2098,14 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
|
||||
#ifdef BOTS
|
||||
if(!RuleB(Bots, BotGroupXP) && !ownerInGroup) {
|
||||
give_exp = NULL;
|
||||
give_exp = nullptr;
|
||||
}
|
||||
#endif //BOTS
|
||||
}
|
||||
|
||||
int PlayerCount = 0; // QueryServ Player Counting
|
||||
|
||||
Client *give_exp_client = NULL;
|
||||
Client *give_exp_client = nullptr;
|
||||
if(give_exp && give_exp->IsClient())
|
||||
give_exp_client = give_exp->CastToClient();
|
||||
|
||||
@@ -2123,7 +2124,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
}
|
||||
/* Send the EVENT_KILLED_MERIT event for all raid members */
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if (kr->members[i].member != NULL) { // If Group Member is Client
|
||||
if (kr->members[i].member != nullptr) { // If Group Member is Client
|
||||
parse->EventNPC(EVENT_KILLED_MERIT, this, kr->members[i].member, "killed", 0);
|
||||
|
||||
mod_npc_killed_merit(kr->members[i].member);
|
||||
@@ -2143,7 +2144,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
QS->s1.ZoneID = this->GetZoneID();
|
||||
QS->s1.Type = 2; // Raid Fight
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if (kr->members[i].member != NULL) { // If Group Member is Client
|
||||
if (kr->members[i].member != nullptr) { // If Group Member is Client
|
||||
Client *c = kr->members[i].member;
|
||||
QS->Chars[PlayerCount].char_id = c->CharacterID();
|
||||
PlayerCount++;
|
||||
@@ -2155,7 +2156,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
// End QueryServ Logging
|
||||
|
||||
}
|
||||
else if (give_exp_client->IsGrouped() && kg != NULL)
|
||||
else if (give_exp_client->IsGrouped() && kg != nullptr)
|
||||
{
|
||||
if(!IsLdonTreasure) {
|
||||
kg->SplitExp((EXP_FORMULA), this);
|
||||
@@ -2165,7 +2166,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
/* Send the EVENT_KILLED_MERIT event and update kill tasks
|
||||
* for all group members */
|
||||
for (int i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (kg->members[i] != NULL && kg->members[i]->IsClient()) { // If Group Member is Client
|
||||
if (kg->members[i] != nullptr && kg->members[i]->IsClient()) { // If Group Member is Client
|
||||
Client *c = kg->members[i]->CastToClient();
|
||||
parse->EventNPC(EVENT_KILLED_MERIT, this, c, "killed", 0);
|
||||
|
||||
@@ -2187,7 +2188,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
QS->s1.ZoneID = this->GetZoneID();
|
||||
QS->s1.Type = 1; // Group Fight
|
||||
for (int i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (kg->members[i] != NULL && kg->members[i]->IsClient()) { // If Group Member is Client
|
||||
if (kg->members[i] != nullptr && kg->members[i]->IsClient()) { // If Group Member is Client
|
||||
Client *c = kg->members[i]->CastToClient();
|
||||
QS->Chars[PlayerCount].char_id = c->CharacterID();
|
||||
PlayerCount++;
|
||||
@@ -2271,7 +2272,7 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
Group* group = entity_list.GetGroupByClient(killer->CastToClient());
|
||||
if(group != 0) {
|
||||
for(int i=0;i<6;i++) { // Doesnt work right, needs work
|
||||
if(group->members[i] != NULL) {
|
||||
if(group->members[i] != nullptr) {
|
||||
corpse->AllowMobLoot(group->members[i],i);
|
||||
}
|
||||
}
|
||||
@@ -2367,13 +2368,13 @@ void NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
|
||||
this->WipeHateList();
|
||||
p_depop = true;
|
||||
if(killerMob && killerMob->GetTarget() == this) //we can kill things without having them targeted
|
||||
killerMob->SetTarget(NULL); //via AE effects and such..
|
||||
killerMob->SetTarget(nullptr); //via AE effects and such..
|
||||
|
||||
entity_list.UpdateFindableNPCState(this, true);
|
||||
}
|
||||
|
||||
void Mob::AddToHateList(Mob* other, int32 hate, int32 damage, bool iYellForHelp, bool bFrenzy, bool iBuffTic) {
|
||||
assert(other != NULL);
|
||||
assert(other != nullptr);
|
||||
if (other == this)
|
||||
return;
|
||||
|
||||
@@ -2617,12 +2618,12 @@ uint8 Mob::GetWeaponDamageBonus( const Item_Struct *Weapon )
|
||||
// Assert: This function should not be called unless the player is a melee class, as casters do not receive a damage bonus.
|
||||
|
||||
|
||||
if( Weapon == NULL || Weapon->ItemType == ItemType1HS || Weapon->ItemType == ItemType1HB || Weapon->ItemType == ItemTypeHand2Hand || Weapon->ItemType == ItemTypePierce )
|
||||
if( Weapon == nullptr || Weapon->ItemType == ItemType1HS || Weapon->ItemType == ItemType1HB || Weapon->ItemType == ItemTypeHand2Hand || Weapon->ItemType == ItemTypePierce )
|
||||
{
|
||||
// The weapon in the player's main (primary) hand is a one-handed weapon, or there is no item equipped at all.
|
||||
//
|
||||
// According to player posts on Allakhazam, 1H damage bonuses apply to bare fists (nothing equipped in the mainhand,
|
||||
// as indicated by Weapon == NULL).
|
||||
// as indicated by Weapon == nullptr).
|
||||
//
|
||||
// The following formula returns the correct damage bonus for all 1H weapons:
|
||||
|
||||
@@ -3296,7 +3297,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
damage = -5;
|
||||
}
|
||||
|
||||
if( spell_id != SPELL_UNKNOWN || attacker == NULL )
|
||||
if( spell_id != SPELL_UNKNOWN || attacker == nullptr )
|
||||
avoidable = false;
|
||||
|
||||
// only apply DS if physical damage (no spell damage)
|
||||
@@ -3525,7 +3526,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Damage, sizeof(CombatDamage_Struct));
|
||||
CombatDamage_Struct* a = (CombatDamage_Struct*)outapp->pBuffer;
|
||||
a->target = GetID();
|
||||
if (attacker == NULL)
|
||||
if (attacker == nullptr)
|
||||
a->source = 0;
|
||||
else if (attacker->IsClient() && attacker->CastToClient()->GMHideMe())
|
||||
a->source = 0;
|
||||
@@ -3659,7 +3660,7 @@ void Mob::HealDamage(uint32 amount, Mob* caster) {
|
||||
else
|
||||
acthealed = amount;
|
||||
|
||||
char *TempString = NULL;
|
||||
char *TempString = nullptr;
|
||||
|
||||
MakeAnyLenString(&TempString, "%d", acthealed);
|
||||
|
||||
@@ -3778,7 +3779,7 @@ float Mob::GetDefensiveProcChances(float &ProcBonus, float &ProcChance, uint16 w
|
||||
void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand, int damage) {
|
||||
|
||||
if (!on) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Mob::TryDefensiveProc for evaluation!");
|
||||
return;
|
||||
}
|
||||
@@ -3793,7 +3794,7 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand, int dam
|
||||
return;
|
||||
|
||||
float ProcChance, ProcBonus;
|
||||
if(weapon!=NULL)
|
||||
if(weapon!=nullptr)
|
||||
on->GetDefensiveProcChances(ProcBonus, ProcChance, weapon->GetItem()->Delay, hand);
|
||||
else
|
||||
on->GetDefensiveProcChances(ProcBonus, ProcChance);
|
||||
@@ -3831,18 +3832,18 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand, int dam
|
||||
void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
||||
_ZP(Mob_TryWeaponProcA);
|
||||
if(!on) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!weapon_g) {
|
||||
TryWeaponProc((const Item_Struct*) NULL, on, hand);
|
||||
TryWeaponProc((const Item_Struct*) nullptr, on, hand);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!weapon_g->IsType(ItemClassCommon)) {
|
||||
TryWeaponProc((const Item_Struct*) NULL, on, hand);
|
||||
TryWeaponProc((const Item_Struct*) nullptr, on, hand);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3874,7 +3875,7 @@ void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
||||
if (MakeRandomFloat(0, 1) < ProcChance) {
|
||||
if(aug->Proc.Level > ourlevel) {
|
||||
Mob * own = GetOwner();
|
||||
if(own != NULL) {
|
||||
if(own != nullptr) {
|
||||
own->Message_StringID(13,PROC_PETTOOLOW);
|
||||
} else {
|
||||
Message_StringID(13,PROC_TOOLOW);
|
||||
@@ -3892,7 +3893,7 @@ void Mob::TryWeaponProc(const Item_Struct* weapon, Mob *on, uint16 hand) {
|
||||
uint16 skillinuse = 28;
|
||||
int ourlevel = GetLevel();
|
||||
float ProcChance, ProcBonus;
|
||||
if(weapon!=NULL)
|
||||
if(weapon!=nullptr)
|
||||
GetProcChances(ProcBonus, ProcChance, weapon->Delay, hand);
|
||||
else
|
||||
GetProcChances(ProcBonus, ProcChance);
|
||||
@@ -3901,7 +3902,7 @@ void Mob::TryWeaponProc(const Item_Struct* weapon, Mob *on, uint16 hand) {
|
||||
ProcChance /= 2;
|
||||
|
||||
//give weapon a chance to proc first.
|
||||
if(weapon != NULL) {
|
||||
if(weapon != nullptr) {
|
||||
skillinuse = GetSkillByItemType(weapon->ItemType);
|
||||
if (weapon->Proc.Type == ET_CombatProc) {
|
||||
float WPC = ProcChance*(100.0f+(float)weapon->ProcRate)/100.0f;
|
||||
@@ -3909,7 +3910,7 @@ void Mob::TryWeaponProc(const Item_Struct* weapon, Mob *on, uint16 hand) {
|
||||
if(weapon->Proc.Level > ourlevel) {
|
||||
mlog(COMBAT__PROCS, "Tried to proc (%s), but our level (%d) is lower than required (%d)", weapon->Name, ourlevel, weapon->Proc.Level);
|
||||
Mob * own = GetOwner();
|
||||
if(own != NULL) {
|
||||
if(own != nullptr) {
|
||||
own->Message_StringID(13,PROC_PETTOOLOW);
|
||||
} else {
|
||||
Message_StringID(13,PROC_TOOLOW);
|
||||
@@ -3930,7 +3931,7 @@ void Mob::TryWeaponProc(const Item_Struct* weapon, Mob *on, uint16 hand) {
|
||||
}
|
||||
|
||||
bool bRangedAttack = false;
|
||||
if (weapon != NULL) {
|
||||
if (weapon != nullptr) {
|
||||
if (weapon->ItemType == ItemTypeBow || weapon->ItemType == ItemTypeThrowing || weapon->ItemType == ItemTypeThrowingv2) {
|
||||
bRangedAttack = true;
|
||||
}
|
||||
@@ -4001,7 +4002,7 @@ void Mob::TryPetCriticalHit(Mob *defender, uint16 skill, int32 &damage)
|
||||
//Each rank adds an additional 1% chance for any melee hit (primary, secondary, kick, bash, etc) to critical,
|
||||
//dealing up to 63% more damage. http://www.magecompendium.com/aa-short-library.html
|
||||
|
||||
Mob *owner = NULL;
|
||||
Mob *owner = nullptr;
|
||||
float critChance = 0.0f;
|
||||
critChance += RuleI(Combat, MeleeBaseCritChance);
|
||||
uint16 critMod = 163;
|
||||
@@ -4310,7 +4311,7 @@ void Mob::TrySkillProc(Mob *on, uint16 skill, float chance)
|
||||
{
|
||||
|
||||
if (!on) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Mob::TrySkillProc for evaluation!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ char com_list[512];
|
||||
pch = strtok(temp,ty);
|
||||
for (int i=0; i < pos; i++) {
|
||||
if (pos == i) break;
|
||||
pch = strtok(NULL,ty);
|
||||
pch = strtok(nullptr,ty);
|
||||
}
|
||||
return pch;
|
||||
}*/
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ extern Zone* zone;
|
||||
Beacon::Beacon(Mob *at_mob, int lifetime)
|
||||
:Mob
|
||||
(
|
||||
NULL, NULL, 0, 0, 0, INVISIBLE_MAN, 0, BT_NoTarget, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
nullptr, nullptr, 0, 0, 0, INVISIBLE_MAN, 0, BT_NoTarget, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
),
|
||||
remove_timer(lifetime),
|
||||
|
||||
+1
-1
@@ -1193,7 +1193,7 @@ void Mob::CalcSpellBonuses(StatBonuses* newbon)
|
||||
void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* newbon, uint16 casterId, bool item_bonus, uint32 ticsremaining, int buffslot)
|
||||
{
|
||||
int i, effect_value;
|
||||
Mob *caster = NULL;
|
||||
Mob *caster = nullptr;
|
||||
|
||||
if(!IsValidSpell(spell_id))
|
||||
return;
|
||||
|
||||
+68
-68
@@ -1288,7 +1288,7 @@ void Bot::GenerateArmorClass()
|
||||
|
||||
uint16 Bot::GetPrimarySkillValue()
|
||||
{
|
||||
SkillType skill = HIGHEST_SKILL; //because NULL == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
|
||||
SkillType skill = HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
|
||||
bool equiped = m_inv.GetItem(SLOT_PRIMARY);
|
||||
|
||||
if(!equiped)
|
||||
@@ -3115,7 +3115,7 @@ bool Bot::Process()
|
||||
return true;
|
||||
|
||||
//Handle assists...
|
||||
/*if(assist_timer.Check() && !Charmed() && GetTarget() != NULL) {
|
||||
/*if(assist_timer.Check() && !Charmed() && GetTarget() != nullptr) {
|
||||
entity_list.AIYellForHelp(this, GetTarget());
|
||||
}*/
|
||||
|
||||
@@ -3307,7 +3307,7 @@ void Bot::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skil
|
||||
|
||||
if(GetLevel() >= 28 && IsWarriorClass() )
|
||||
{
|
||||
int ucDamageBonus = GetWeaponDamageBonus((const Item_Struct*) NULL );
|
||||
int ucDamageBonus = GetWeaponDamageBonus((const Item_Struct*) nullptr );
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -3425,14 +3425,14 @@ bool Bot::CanDoSpecialAttack(Mob *other)
|
||||
{
|
||||
//Make sure everything is valid before doing any attacks.
|
||||
if (!other) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!GetTarget())
|
||||
SetTarget(other);
|
||||
|
||||
if ((other == NULL || ((GetAppearance() == eaDead) || (other->IsClient() && other->CastToClient()->IsDead()))
|
||||
if ((other == nullptr || ((GetAppearance() == eaDead) || (other->IsClient() && other->CastToClient()->IsDead()))
|
||||
|| HasDied() || (!IsAttackAllowed(other)))) {
|
||||
return false;
|
||||
}
|
||||
@@ -4811,7 +4811,7 @@ bool Bot::GroupHasBot(Group* group) {
|
||||
|
||||
if(group) {
|
||||
for(int Counter = 0; Counter < MAX_GROUP_MEMBERS; Counter++) {
|
||||
if (group->members[Counter] == NULL) {
|
||||
if (group->members[Counter] == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -5408,7 +5408,7 @@ ItemInst* Bot::GetBotItem(uint32 slotID) {
|
||||
return item;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Adds the specified item it bot to the NPC equipment array and to the bot inventory collection.
|
||||
@@ -6027,7 +6027,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
|
||||
if(!failedLoreCheck && mWeaponItem && inst->IsEquipable(GetBaseRace(), GetClass()) && (GetLevel() >= mWeaponItem->ReqLevel)) {
|
||||
BotCanWear = true;
|
||||
botCanWear[i] = BotCanWear;
|
||||
ItemInst* swap_item = NULL;
|
||||
ItemInst* swap_item = nullptr;
|
||||
|
||||
const char* equipped[22] = {"Charm", "Left Ear", "Head", "Face", "Right Ear", "Neck", "Shoulders", "Arms", "Back",
|
||||
"Left Wrist", "Right Wrist", "Range", "Hands", "Primary Hand", "Secondary Hand",
|
||||
@@ -6201,7 +6201,7 @@ void Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillType attack_
|
||||
Save();
|
||||
|
||||
Mob *give_exp = hate_list.GetDamageTop(this);
|
||||
Client *give_exp_client = NULL;
|
||||
Client *give_exp_client = nullptr;
|
||||
|
||||
if(give_exp && give_exp->IsClient())
|
||||
give_exp_client = give_exp->CastToClient();
|
||||
@@ -6220,7 +6220,7 @@ void Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillType attack_
|
||||
// br->SplitExp((EXP_FORMULA), this);
|
||||
|
||||
// if(br->GetBotMainTarget() == this)
|
||||
// br->SetBotMainTarget(NULL);
|
||||
// br->SetBotMainTarget(nullptr);
|
||||
|
||||
// /* Send the EVENT_KILLED_MERIT event for all raid members */
|
||||
// if(br->BotRaidGroups[0]) {
|
||||
@@ -6272,7 +6272,7 @@ void Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillType attack_
|
||||
strcpy(g->membername[j-1], g->members[j]->GetCleanName());
|
||||
g->membername[j][0] = '\0';
|
||||
memset(g->membername[j], 0, 64);
|
||||
g->members[j] = NULL;
|
||||
g->members[j] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6295,10 +6295,10 @@ void Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillType attack_
|
||||
BotRaids* br = entity_list.GetBotRaidByMob(this);
|
||||
if(br) {
|
||||
if(this == br->botmaintank) {
|
||||
br->botmaintank = NULL;
|
||||
br->botmaintank = nullptr;
|
||||
}
|
||||
if(this == br->botsecondtank) {
|
||||
br->botsecondtank = NULL;
|
||||
br->botsecondtank = nullptr;
|
||||
}
|
||||
}
|
||||
if(g->GroupCount() == 0) {
|
||||
@@ -6392,7 +6392,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
_ZP(Bot_Attack);
|
||||
|
||||
if (!other) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Bot::Attack for evaluation!");
|
||||
return false;
|
||||
}
|
||||
@@ -6400,10 +6400,10 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
if(!GetTarget() || GetTarget() != other)
|
||||
SetTarget(other);
|
||||
|
||||
mlog(COMBAT__ATTACKS, "Attacking %s with hand %d %s", other?other->GetCleanName():"(NULL)", Hand, FromRiposte?"(this is a riposte)":"");
|
||||
mlog(COMBAT__ATTACKS, "Attacking %s with hand %d %s", other?other->GetCleanName():"(nullptr)", Hand, FromRiposte?"(this is a riposte)":"");
|
||||
|
||||
if ((IsCasting() && (GetClass() != BARD) && !IsFromSpell) ||
|
||||
other == NULL ||
|
||||
other == nullptr ||
|
||||
(GetHP() < 0) ||
|
||||
(GetAppearance() == eaDead) ||
|
||||
(!IsAttackAllowed(other)))
|
||||
@@ -6432,7 +6432,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
|
||||
FaceTarget(GetTarget());
|
||||
|
||||
ItemInst* weapon = NULL;
|
||||
ItemInst* weapon = nullptr;
|
||||
if(Hand == SLOT_PRIMARY) {
|
||||
weapon = GetBotItem(SLOT_PRIMARY);
|
||||
OffHandAtk(false);
|
||||
@@ -6442,7 +6442,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
OffHandAtk(true);
|
||||
}
|
||||
|
||||
if(weapon != NULL) {
|
||||
if(weapon != nullptr) {
|
||||
if (!weapon->IsWeapon()) {
|
||||
mlog(COMBAT__ATTACKS, "Attack canceled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
||||
return(false);
|
||||
@@ -6510,7 +6510,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
// Damage bonuses apply only to hits from the main hand (Hand == 13) by characters level 28 and above
|
||||
// who belong to a melee class. If we're here, then all of these conditions apply.
|
||||
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) NULL );
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) nullptr );
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -6521,7 +6521,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
if (Hand==SLOT_SECONDARY) {
|
||||
if (aabonuses.SecondaryDmgInc || itembonuses.SecondaryDmgInc || spellbonuses.SecondaryDmgInc){
|
||||
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) NULL );
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const Item_Struct*) nullptr );
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -7135,7 +7135,7 @@ int16 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
//item focus
|
||||
for(int x=0; x<=21; x++)
|
||||
{
|
||||
TempItem = NULL;
|
||||
TempItem = nullptr;
|
||||
ItemInst* ins = GetBotItem(x);
|
||||
if (!ins)
|
||||
continue;
|
||||
@@ -7169,7 +7169,7 @@ int16 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) {
|
||||
|
||||
for(int y = 0; y < MAX_AUGMENT_SLOTS; ++y)
|
||||
{
|
||||
ItemInst *aug = NULL;
|
||||
ItemInst *aug = nullptr;
|
||||
aug = ins->GetAugment(y);
|
||||
if(aug)
|
||||
{
|
||||
@@ -8470,7 +8470,7 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) {
|
||||
bool bCanFrontalBS = false;
|
||||
|
||||
const ItemInst* inst = GetBotItem(SLOT_PRIMARY);
|
||||
const Item_Struct* botpiercer = NULL;
|
||||
const Item_Struct* botpiercer = nullptr;
|
||||
if(inst)
|
||||
botpiercer = inst->GetItem();
|
||||
if(!botpiercer || (botpiercer->ItemType != ItemTypePierce)) {
|
||||
@@ -9136,7 +9136,7 @@ void Bot::EquipBot(std::string* errorMessage) {
|
||||
// BotRaids* br = entity_list.GetBotRaidByMob(client);
|
||||
// if(br) {
|
||||
// br->RemoveRaidBots();
|
||||
// br = NULL;
|
||||
// br = nullptr;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@@ -9339,8 +9339,8 @@ void Bot::SetAttackTimer() {
|
||||
//an invalid weapon equipped:
|
||||
attack_timer.SetAtTrigger(4000, true);
|
||||
|
||||
Timer* TimerToUse = NULL;
|
||||
const Item_Struct* PrimaryWeapon = NULL;
|
||||
Timer* TimerToUse = nullptr;
|
||||
const Item_Struct* PrimaryWeapon = nullptr;
|
||||
|
||||
for (int i=SLOT_RANGE; i<=SLOT_SECONDARY; i++) {
|
||||
|
||||
@@ -9354,7 +9354,7 @@ void Bot::SetAttackTimer() {
|
||||
else //invalid slot (hands will always hit this)
|
||||
continue;
|
||||
|
||||
const Item_Struct* ItemToUse = NULL;
|
||||
const Item_Struct* ItemToUse = nullptr;
|
||||
ItemInst* ci = GetBotItem(i);
|
||||
if(ci)
|
||||
ItemToUse = ci->GetItem();
|
||||
@@ -9362,7 +9362,7 @@ void Bot::SetAttackTimer() {
|
||||
//special offhand stuff
|
||||
if(i == SLOT_SECONDARY) {
|
||||
//if we have a 2H weapon in our main hand, no dual
|
||||
if(PrimaryWeapon != NULL) {
|
||||
if(PrimaryWeapon != nullptr) {
|
||||
if( PrimaryWeapon->ItemClass == ItemClassCommon
|
||||
&& (PrimaryWeapon->ItemType == ItemType2HS
|
||||
|| PrimaryWeapon->ItemType == ItemType2HB
|
||||
@@ -9380,18 +9380,18 @@ void Bot::SetAttackTimer() {
|
||||
}
|
||||
|
||||
//see if we have a valid weapon
|
||||
if(ItemToUse != NULL) {
|
||||
if(ItemToUse != nullptr) {
|
||||
//check type and damage/delay
|
||||
if(ItemToUse->ItemClass != ItemClassCommon
|
||||
|| ItemToUse->Damage == 0
|
||||
|| ItemToUse->Delay == 0) {
|
||||
//no weapon
|
||||
ItemToUse = NULL;
|
||||
ItemToUse = nullptr;
|
||||
}
|
||||
// Check to see if skill is valid
|
||||
else if((ItemToUse->ItemType > ItemTypeThrowing) && (ItemToUse->ItemType != ItemTypeHand2Hand) && (ItemToUse->ItemType != ItemType2HPierce)) {
|
||||
//no weapon
|
||||
ItemToUse = NULL;
|
||||
ItemToUse = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9400,7 +9400,7 @@ void Bot::SetAttackTimer() {
|
||||
DelayMod = -99;
|
||||
|
||||
//if we have no weapon..
|
||||
if (ItemToUse == NULL) {
|
||||
if (ItemToUse == nullptr) {
|
||||
//above checks ensure ranged weapons do not fall into here
|
||||
// Work out if we're a monk
|
||||
if ((GetClass() == MONK) || (GetClass() == BEASTLORD)) {
|
||||
@@ -11624,7 +11624,7 @@ Bot* Bot::GetFirstBotInGroup(Group* group) {
|
||||
|
||||
if(group) {
|
||||
for(int Counter = 0; Counter < MAX_GROUP_MEMBERS; Counter++) {
|
||||
if (group->members[Counter] == NULL) {
|
||||
if (group->members[Counter] == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -11984,7 +11984,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
// pull
|
||||
if(!strcasecmp(sep->arg[1], "pull")) {
|
||||
Mob *target = c->GetTarget();
|
||||
if(target == NULL || target == c || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
if(target == nullptr || target == c || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
{
|
||||
c->Message(15, "You must select a monster");
|
||||
return;
|
||||
@@ -12019,7 +12019,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
// added Bot follow distance - SetFollowDistance
|
||||
if(!strcasecmp(sep->arg[1], "setfollowdistance")) {
|
||||
if((c->GetTarget() == NULL) || (c->GetTarget() == c) || (!c->GetTarget()->IsBot()) || (c->GetTarget()->CastToBot()->GetBotOwner() != c)) {
|
||||
if((c->GetTarget() == nullptr) || (c->GetTarget() == c) || (!c->GetTarget()->IsBot()) || (c->GetTarget()->CastToBot()->GetBotOwner() != c)) {
|
||||
c->Message(15, "You must target a bot you own!");
|
||||
}
|
||||
else {
|
||||
@@ -12201,7 +12201,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "delete") ) {
|
||||
if((c->GetTarget() == NULL) || !c->GetTarget()->IsBot())
|
||||
if((c->GetTarget() == nullptr) || !c->GetTarget()->IsBot())
|
||||
{
|
||||
c->Message(15, "You must target a bot!");
|
||||
return;
|
||||
@@ -12421,7 +12421,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "archery")) {
|
||||
if((c->GetTarget() == NULL) || (c->GetTarget() == c) || !c->GetTarget()->IsBot()) {
|
||||
if((c->GetTarget() == nullptr) || (c->GetTarget() == c) || !c->GetTarget()->IsBot()) {
|
||||
c->Message(15, "You must target a bot!");
|
||||
return;
|
||||
}
|
||||
@@ -12444,7 +12444,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "picklock")) {
|
||||
if((c->GetTarget() == NULL) || (c->GetTarget() == c) || !c->GetTarget()->IsBot() || (c->GetTarget()->GetClass() != ROGUE)) {
|
||||
if((c->GetTarget() == nullptr) || (c->GetTarget() == c) || !c->GetTarget()->IsBot() || (c->GetTarget()->GetClass() != ROGUE)) {
|
||||
c->Message(15, "You must target a rogue bot!");
|
||||
}
|
||||
else {
|
||||
@@ -12455,7 +12455,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "summon")) {
|
||||
if((c->GetTarget() == NULL) || (c->GetTarget() == c) || !c->GetTarget()->IsBot() || c->GetTarget()->IsPet())
|
||||
if((c->GetTarget() == nullptr) || (c->GetTarget() == c) || !c->GetTarget()->IsBot() || c->GetTarget()->IsPet())
|
||||
{
|
||||
c->Message(15, "You must target a bot!");
|
||||
}
|
||||
@@ -12484,7 +12484,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "inventory") && !strcasecmp(sep->arg[2], "list")) {
|
||||
if(c->GetTarget() != NULL) {
|
||||
if(c->GetTarget() != nullptr) {
|
||||
if(c->GetTarget()->IsBot() && c->GetTarget()->CastToBot()->GetBotOwnerCharacterID() == c->CharacterID()) {
|
||||
Mob* b = c->GetTarget();
|
||||
int x = c->GetTarget()->CastToBot()->GetBotItemsCount(&TempErrorMessage);
|
||||
@@ -12497,8 +12497,8 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
const char* equipped[22] = {"Charm", "Left Ear", "Head", "Face", "Right Ear", "Neck", "Shoulders", "Arms", "Back",
|
||||
"Left Wrist", "Right Wrist", "Range", "Hands", "Primary Hand", "Secondary Hand",
|
||||
"Left Finger", "Right Finger", "Chest", "Legs", "Feet", "Waist", "Ammo" };
|
||||
const ItemInst* item1 = NULL;
|
||||
const Item_Struct* item2 = NULL;
|
||||
const ItemInst* item1 = nullptr;
|
||||
const Item_Struct* item2 = nullptr;
|
||||
bool is2Hweapon = false;
|
||||
for(int i=0; i<22; ++i)
|
||||
{
|
||||
@@ -12510,7 +12510,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
if(item1)
|
||||
item2 = item1->GetItem();
|
||||
else
|
||||
item2 = NULL;
|
||||
item2 = nullptr;
|
||||
|
||||
if(!TempErrorMessage.empty()) {
|
||||
c->Message(13, "Database Error: %s", TempErrorMessage.c_str());
|
||||
@@ -12610,7 +12610,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "inventory") && !strcasecmp(sep->arg[2], "remove")) {
|
||||
if((c->GetTarget() == NULL) || (sep->arg[3] == '\0') || !c->GetTarget()->IsBot())
|
||||
if((c->GetTarget() == nullptr) || (sep->arg[3] == '\0') || !c->GetTarget()->IsBot())
|
||||
{
|
||||
c->Message(15, "Usage: #bot inventory remove [slotid] (You must have a bot targetted) ");
|
||||
return;
|
||||
@@ -12629,7 +12629,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
"Left Wrist", "Right Wrist", "Range", "Hands", "Primary Hand", "Secondary Hand",
|
||||
"Left Finger", "Right Finger", "Chest", "Legs", "Feet", "Waist", "Ammo" };
|
||||
|
||||
const Item_Struct* itm = NULL;
|
||||
const Item_Struct* itm = nullptr;
|
||||
const ItemInst* itminst = c->GetTarget()->CastToBot()->GetBotItem(slotId);
|
||||
if(itminst)
|
||||
itm = itminst->GetItem();
|
||||
@@ -12744,7 +12744,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "update")) {
|
||||
// Congdar: add IsEngaged check for exploit to keep bots alive by repeatedly using #bot update.
|
||||
if((c->GetTarget() != NULL) && c->GetTarget()->IsBot()) {
|
||||
if((c->GetTarget() != nullptr) && c->GetTarget()->IsBot()) {
|
||||
if(c->GetLevel() <= c->GetTarget()->GetLevel()) {
|
||||
c->Message(15, "This bot has already been updated.");
|
||||
return;
|
||||
@@ -12787,7 +12787,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
//Bind
|
||||
if(!strcasecmp(sep->arg[1], "bindme")) {
|
||||
Mob *binder = NULL;
|
||||
Mob *binder = nullptr;
|
||||
bool hasbinder = false;
|
||||
if(c->IsGrouped())
|
||||
{
|
||||
@@ -12815,7 +12815,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
// Rune
|
||||
if(!strcasecmp(sep->arg[1], "runeme")) {
|
||||
Mob *runeer = NULL;
|
||||
Mob *runeer = nullptr;
|
||||
bool hasruneer = false;
|
||||
if(c->IsGrouped())
|
||||
{
|
||||
@@ -13065,7 +13065,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
if(!strcasecmp(sep->arg[1], "ai") && !strcasecmp(sep->arg[2], "mez"))
|
||||
{
|
||||
Mob *target = c->GetTarget();
|
||||
if(target == NULL || target == c || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
if(target == nullptr || target == c || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
{
|
||||
c->Message(15, "You must select a monster");
|
||||
return;
|
||||
@@ -13147,7 +13147,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
if(!strcasecmp(sep->arg[1], "resurrectme"))
|
||||
{
|
||||
Mob *target = c->GetTarget();
|
||||
if(target == NULL || !target->IsCorpse())
|
||||
if(target == nullptr || !target->IsCorpse())
|
||||
{
|
||||
c->Message(15, "You must select a corpse");
|
||||
return;
|
||||
@@ -13261,7 +13261,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
//Summon Corpse
|
||||
if(!strcasecmp(sep->arg[1], "corpse") && !strcasecmp(sep->arg[2], "summon")) {
|
||||
if(c->GetTarget() == NULL) {
|
||||
if(c->GetTarget() == nullptr) {
|
||||
c->Message(15, "You must select player with his corpse in the zone.");
|
||||
return;
|
||||
}
|
||||
@@ -13315,7 +13315,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
{
|
||||
Mob *target = c->GetTarget();
|
||||
|
||||
if(target == NULL || target->IsClient() || target->IsBot() || target->IsPet() && target->GetOwner()->IsBot())
|
||||
if(target == nullptr || target->IsClient() || target->IsBot() || target->IsPet() && target->GetOwner()->IsBot())
|
||||
c->Message(15, "You must select a monster");
|
||||
else {
|
||||
if(c->IsGrouped()) {
|
||||
@@ -13367,7 +13367,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
if(!strcasecmp(sep->arg[1], "charm"))
|
||||
{
|
||||
Mob *target = c->GetTarget();
|
||||
if(target == NULL || target->IsClient() || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
if(target == nullptr || target->IsClient() || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
{
|
||||
c->Message(15, "You must select a monster");
|
||||
return;
|
||||
@@ -13447,7 +13447,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
// Remove Bot's Pet
|
||||
if(!strcasecmp(sep->arg[1], "pet") && !strcasecmp(sep->arg[2], "remove")) {
|
||||
if(c->GetTarget() != NULL) {
|
||||
if(c->GetTarget() != nullptr) {
|
||||
if (c->IsGrouped() && c->GetTarget()->IsBot() && (c->GetTarget()->CastToBot()->GetBotOwner() == c) &&
|
||||
((c->GetTarget()->GetClass() == NECROMANCER) || (c->GetTarget()->GetClass() == ENCHANTER) || (c->GetTarget()->GetClass() == DRUID))) {
|
||||
if(c->GetTarget()->CastToBot()->IsBotCharmer()) {
|
||||
@@ -13480,7 +13480,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
if(!strcasecmp(sep->arg[1], "Dire") && !strcasecmp(sep->arg[2], "Charm"))
|
||||
{
|
||||
Mob *target = c->GetTarget();
|
||||
if(target == NULL || target->IsClient() || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
if(target == nullptr || target->IsClient() || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
|
||||
{
|
||||
c->Message(15, "You must select a monster");
|
||||
return;
|
||||
@@ -13560,7 +13560,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
// Evacuate
|
||||
if(!strcasecmp(sep->arg[1], "evac")) {
|
||||
Mob *evac = NULL;
|
||||
Mob *evac = nullptr;
|
||||
bool hasevac = false;
|
||||
if(c->IsGrouped())
|
||||
{
|
||||
@@ -13728,7 +13728,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
Group *g = c->GetGroup();
|
||||
Mob *target = c->GetTarget();
|
||||
|
||||
if(target == NULL || (!target->IsClient() && (c->GetTarget()->CastToBot()->GetBotOwner() != c)))
|
||||
if(target == nullptr || (!target->IsClient() && (c->GetTarget()->CastToBot()->GetBotOwner() != c)))
|
||||
c->Message(15, "You must select a player or bot you own");
|
||||
|
||||
else if(g) {
|
||||
@@ -14658,7 +14658,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
BotGroupOrderGuard(c->GetGroup(), c);
|
||||
}
|
||||
else if(!strcasecmp(sep->arg[2], "attack")) {
|
||||
if(c->IsGrouped() && (c->GetTarget() != NULL) && c->IsAttackAllowed(c->GetTarget())) {
|
||||
if(c->IsGrouped() && (c->GetTarget() != nullptr) && c->IsAttackAllowed(c->GetTarget())) {
|
||||
BotGroupOrderAttack(c->GetGroup(), c->GetTarget(), c);
|
||||
}
|
||||
else
|
||||
@@ -15339,7 +15339,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
Bot* targetedBot;
|
||||
|
||||
if(c->GetTarget() != NULL) {
|
||||
if(c->GetTarget() != nullptr) {
|
||||
if (c->GetTarget()->IsBot() && (c->GetTarget()->CastToBot()->GetBotOwner() == c))
|
||||
targetedBot = c->GetTarget()->CastToBot();
|
||||
else
|
||||
@@ -15378,7 +15378,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "stance")) {
|
||||
if(sep->argnum == 3){
|
||||
Bot* tempBot = NULL;
|
||||
Bot* tempBot = nullptr;
|
||||
std::string botName = std::string(sep->arg[2]);
|
||||
|
||||
if(!botName.empty())
|
||||
@@ -15627,7 +15627,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(leaderBot) {
|
||||
Mob* target = NULL;
|
||||
Mob* target = nullptr;
|
||||
uint32 timer;
|
||||
bool fastHeals = false;
|
||||
|
||||
@@ -15836,7 +15836,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
||||
if(!targetName.empty())
|
||||
target = entity_list.GetMob(targetName.c_str());
|
||||
else {
|
||||
if(c->GetTarget() != NULL) {
|
||||
if(c->GetTarget() != nullptr) {
|
||||
target = c->GetTarget();
|
||||
}
|
||||
}
|
||||
@@ -16543,7 +16543,7 @@ void EntityList::AddBot(Bot *newBot, bool SendSpawnPacket, bool dontqueue) {
|
||||
safe_delete(ns);
|
||||
}
|
||||
|
||||
parse->EventNPC(EVENT_SPAWN, newBot, NULL, "", 0);
|
||||
parse->EventNPC(EVENT_SPAWN, newBot, nullptr, "", 0);
|
||||
}
|
||||
|
||||
bot_list.push_back(newBot);
|
||||
@@ -17376,9 +17376,9 @@ void Bot::ClearHealRotationTargets() {
|
||||
}
|
||||
|
||||
Mob* Bot::GetHealRotationTarget( ) {
|
||||
Mob* tank = NULL;
|
||||
Mob* first = NULL;
|
||||
Mob* target = NULL;
|
||||
Mob* tank = nullptr;
|
||||
Mob* first = nullptr;
|
||||
Mob* target = nullptr;
|
||||
int removeIndex = 0;
|
||||
int count = 0;
|
||||
|
||||
@@ -17432,7 +17432,7 @@ Mob* Bot::GetHealRotationTarget( ) {
|
||||
}
|
||||
|
||||
Mob* Bot::GetHealRotationTarget( uint8 index ) {
|
||||
Mob* target = NULL;
|
||||
Mob* target = nullptr;
|
||||
|
||||
if(_healRotationTargets[index] > 0) {
|
||||
//get target at specified index
|
||||
@@ -17445,7 +17445,7 @@ Mob* Bot::GetHealRotationTarget( uint8 index ) {
|
||||
list<Bot*> Bot::GetBotsInHealRotation(Bot* rotationLeader) {
|
||||
list<Bot*> Result;
|
||||
|
||||
if(rotationLeader != NULL) {
|
||||
if(rotationLeader != nullptr) {
|
||||
Result.push_back(rotationLeader);
|
||||
Bot* rotationMember = rotationLeader->GetNextHealRotationMember();
|
||||
|
||||
|
||||
+2
-2
@@ -193,7 +193,7 @@ public:
|
||||
virtual int32 CheckAggroAmount(uint16 spellid);
|
||||
virtual void CalcBonuses();
|
||||
void CalcItemBonuses();
|
||||
virtual void MakePet(uint16 spell_id, const char* pettype, const char *petname = NULL);
|
||||
virtual void MakePet(uint16 spell_id, const char* pettype, const char *petname = nullptr);
|
||||
virtual FACTION_VALUE GetReverseFactionCon(Mob* iOther);
|
||||
inline virtual bool IsPet() { return false; }
|
||||
virtual bool IsNPC() const { return false; }
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
virtual float GetAOERange(uint16 spell_id);
|
||||
virtual bool SpellEffect(Mob* caster, uint16 spell_id, float partial = 100);
|
||||
virtual void DoBuffTic(uint16 spell_id, uint32 ticsremaining, uint8 caster_level, Mob* caster = 0);
|
||||
virtual bool CastSpell(uint16 spell_id, uint16 target_id, uint16 slot = 10, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, int16 *resist_adjust = NULL);
|
||||
virtual bool CastSpell(uint16 spell_id, uint16 target_id, uint16 slot = 10, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, int16 *resist_adjust = nullptr);
|
||||
virtual bool SpellOnTarget(uint16 spell_id, Mob* spelltar);
|
||||
virtual bool IsImmuneToSpell(uint16 spell_id, Mob *caster);
|
||||
virtual bool DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction);
|
||||
|
||||
+69
-53
@@ -189,8 +189,8 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
account_id = 0;
|
||||
admin = 0;
|
||||
lsaccountid = 0;
|
||||
shield_target = NULL;
|
||||
SQL_log = NULL;
|
||||
shield_target = nullptr;
|
||||
SQL_log = nullptr;
|
||||
guild_id = GUILD_NONE;
|
||||
guildrank = 0;
|
||||
GuildBanker = false;
|
||||
@@ -239,7 +239,7 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
pLastUpdateWZ = 0;
|
||||
m_pp.autosplit = false;
|
||||
// initialise haste variable
|
||||
m_tradeskill_object = NULL;
|
||||
m_tradeskill_object = nullptr;
|
||||
delaytimer = false;
|
||||
PendingRezzXP = -1;
|
||||
PendingRezzDBID = 0;
|
||||
@@ -251,10 +251,10 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
tgb = false;
|
||||
tribute_master_id = 0xFFFFFFFF;
|
||||
tribute_timer.Disable();
|
||||
taskstate = NULL;
|
||||
taskstate = nullptr;
|
||||
TotalSecondsPlayed = 0;
|
||||
keyring.clear();
|
||||
bind_sight_target = NULL;
|
||||
bind_sight_target = nullptr;
|
||||
mercid = 0;
|
||||
mercSlot = 0;
|
||||
InitializeMercInfo();
|
||||
@@ -296,9 +296,9 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
aa_los_them.x = 0;
|
||||
aa_los_them.y = 0;
|
||||
aa_los_them.z = 0;
|
||||
aa_los_them_mob = NULL;
|
||||
aa_los_them_mob = nullptr;
|
||||
los_status = false;
|
||||
qGlobals = NULL;
|
||||
qGlobals = nullptr;
|
||||
HideCorpseMode = HideCorpseNone;
|
||||
PendingGuildInvitation = false;
|
||||
|
||||
@@ -306,14 +306,14 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
|
||||
InitializeBuffSlots();
|
||||
|
||||
adventure_request_timer = NULL;
|
||||
adventure_create_timer = NULL;
|
||||
adventure_leave_timer = NULL;
|
||||
adventure_door_timer = NULL;
|
||||
adv_requested_data = NULL;
|
||||
adventure_stats_timer = NULL;
|
||||
adventure_leaderboard_timer = NULL;
|
||||
adv_data = NULL;
|
||||
adventure_request_timer = nullptr;
|
||||
adventure_create_timer = nullptr;
|
||||
adventure_leave_timer = nullptr;
|
||||
adventure_door_timer = nullptr;
|
||||
adv_requested_data = nullptr;
|
||||
adventure_stats_timer = nullptr;
|
||||
adventure_leaderboard_timer = nullptr;
|
||||
adv_data = nullptr;
|
||||
adv_requested_theme = 0;
|
||||
adv_requested_id = 0;
|
||||
adv_requested_member_count = 0;
|
||||
@@ -334,7 +334,7 @@ Client::~Client() {
|
||||
Bot::ProcessBotOwnerRefDelete(this);
|
||||
#endif
|
||||
if(IsInAGuild())
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), 0, time(NULL));
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), 0, time(nullptr));
|
||||
|
||||
Mob* horse = entity_list.GetMob(this->CastToClient()->GetHorseId());
|
||||
if (horse)
|
||||
@@ -355,9 +355,9 @@ Client::~Client() {
|
||||
ReportConnectingState();
|
||||
}
|
||||
|
||||
if(m_tradeskill_object != NULL) {
|
||||
if(m_tradeskill_object != nullptr) {
|
||||
m_tradeskill_object->Close();
|
||||
m_tradeskill_object = NULL;
|
||||
m_tradeskill_object = nullptr;
|
||||
}
|
||||
|
||||
#ifdef CLIENT_LOGS
|
||||
@@ -368,10 +368,10 @@ Client::~Client() {
|
||||
// if(AbilityTimer || GetLevel()>=51)
|
||||
// database.UpdateAndDeleteAATimers(CharacterID());
|
||||
|
||||
ChangeSQLLog(NULL);
|
||||
ChangeSQLLog(nullptr);
|
||||
if(IsDueling() && GetDuelTarget() != 0) {
|
||||
Entity* entity = entity_list.GetID(GetDuelTarget());
|
||||
if(entity != NULL && entity->IsClient()) {
|
||||
if(entity != nullptr && entity->IsClient()) {
|
||||
entity->CastToClient()->SetDueling(false);
|
||||
entity->CastToClient()->SetDuelTarget(0);
|
||||
entity_list.DuelMessage(entity->CastToClient(),this,true);
|
||||
@@ -385,7 +385,7 @@ Client::~Client() {
|
||||
shield_target->shielder[y].shielder_bonus = 0;
|
||||
}
|
||||
}
|
||||
shield_target = NULL;
|
||||
shield_target = nullptr;
|
||||
}
|
||||
|
||||
if(GetTarget())
|
||||
@@ -558,7 +558,7 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
|
||||
database.SaveBuffs(this);
|
||||
|
||||
TotalSecondsPlayed += (time(NULL) - m_pp.lastlogin);
|
||||
TotalSecondsPlayed += (time(nullptr) - m_pp.lastlogin);
|
||||
m_pp.timePlayedMin = (TotalSecondsPlayed / 60);
|
||||
m_pp.RestTimer = rest_timer.GetRemainingTime() / 1000;
|
||||
|
||||
@@ -575,7 +575,7 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
memset(&m_mercinfo, 0, sizeof(struct MercInfo));
|
||||
}
|
||||
|
||||
m_pp.lastlogin = time(NULL);
|
||||
m_pp.lastlogin = time(nullptr);
|
||||
if (pQueuedSaveWorkID) {
|
||||
dbasync->CancelWork(pQueuedSaveWorkID);
|
||||
pQueuedSaveWorkID = 0;
|
||||
@@ -646,7 +646,7 @@ void Client::SaveBackup() {
|
||||
|
||||
CLIENTPACKET::CLIENTPACKET()
|
||||
{
|
||||
app = NULL;
|
||||
app = nullptr;
|
||||
ack_req = false;
|
||||
}
|
||||
|
||||
@@ -770,7 +770,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
LogFile->write(EQEMuLog::Debug,"Client::ChannelMessageReceived() Channel:%i message:'%s'", chan_num, message);
|
||||
#endif
|
||||
|
||||
if (targetname == NULL) {
|
||||
if (targetname == nullptr) {
|
||||
targetname = (!GetTarget()) ? "" : GetTarget()->GetName();
|
||||
}
|
||||
|
||||
@@ -872,7 +872,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
}
|
||||
|
||||
Group* group = GetGroup();
|
||||
if(group != NULL) {
|
||||
if(group != nullptr) {
|
||||
group->GroupMessage(this,language,lang_skill,(const char*) message);
|
||||
}
|
||||
break;
|
||||
@@ -1888,8 +1888,8 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
|
||||
// pp also hold this info; should we pull from there or inventory?
|
||||
// (update: i think pp should do it, as this holds LoY dye - plus, this is ugly code with Inventory!)
|
||||
const Item_Struct* item = NULL;
|
||||
const ItemInst* inst = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
const ItemInst* inst = nullptr;
|
||||
if ((inst = m_inv[SLOT_HANDS]) && inst->IsType(ItemClassCommon)) {
|
||||
item = inst->GetItem();
|
||||
ns->spawn.equipment[MATERIAL_HANDS] = item->Material;
|
||||
@@ -2716,7 +2716,7 @@ bool Client::BindWound(Mob* bindmob, bool start, bool fail){
|
||||
bind_out->type = 1; // Done
|
||||
QueuePacket(outapp);
|
||||
bind_out->type = 0;
|
||||
CheckIncreaseSkill(BIND_WOUND, NULL, 5);
|
||||
CheckIncreaseSkill(BIND_WOUND, nullptr, 5);
|
||||
|
||||
int maxHPBonus = spellbonuses.MaxBindWound + itembonuses.MaxBindWound + aabonuses.MaxBindWound;
|
||||
|
||||
@@ -3525,12 +3525,12 @@ void Client::Insight(uint32 t_id)
|
||||
}
|
||||
|
||||
void Client::ChangeSQLLog(const char *file) {
|
||||
if(SQL_log != NULL) {
|
||||
if(SQL_log != nullptr) {
|
||||
fclose(SQL_log);
|
||||
SQL_log = NULL;
|
||||
SQL_log = nullptr;
|
||||
}
|
||||
if(file != NULL) {
|
||||
if(strstr(file, "..") != NULL) {
|
||||
if(file != nullptr) {
|
||||
if(strstr(file, "..") != nullptr) {
|
||||
Message(13, ".. is forbibben in SQL log file names.");
|
||||
return;
|
||||
}
|
||||
@@ -3538,14 +3538,14 @@ void Client::ChangeSQLLog(const char *file) {
|
||||
snprintf(buf, 511, "%s%s", SQL_LOG_PATH, file);
|
||||
buf[511] = '\0';
|
||||
SQL_log = fopen(buf, "a");
|
||||
if(SQL_log == NULL) {
|
||||
if(SQL_log == nullptr) {
|
||||
Message(13, "Unable to open SQL log file: %s\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Client::LogSQL(const char *fmt, ...) {
|
||||
if(SQL_log == NULL)
|
||||
if(SQL_log == nullptr)
|
||||
return;
|
||||
|
||||
va_list argptr;
|
||||
@@ -3588,11 +3588,11 @@ void Client::SendRules(Client* client)
|
||||
database.GetVariable("Rules", rules, 4096);
|
||||
|
||||
ptr = strtok(rules, "\n");
|
||||
while(ptr != NULL)
|
||||
while(ptr != nullptr)
|
||||
{
|
||||
|
||||
client->Message(0,"%s",ptr);
|
||||
ptr = strtok(NULL, "\n");
|
||||
ptr = strtok(nullptr, "\n");
|
||||
}
|
||||
safe_delete_array(rules);
|
||||
}
|
||||
@@ -3724,7 +3724,7 @@ void Client::SendOPTranslocateConfirm(Mob *Caster, uint16 SpellID) {
|
||||
|
||||
PendingTranslocateData = *ts;
|
||||
PendingTranslocate=true;
|
||||
TranslocateTime = time(NULL);
|
||||
TranslocateTime = time(nullptr);
|
||||
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
@@ -3922,7 +3922,7 @@ void Client::KeyRingList()
|
||||
iter != keyring.end();
|
||||
++iter)
|
||||
{
|
||||
if ((item = database.GetItem(*iter))!=NULL) {
|
||||
if ((item = database.GetItem(*iter))!=nullptr) {
|
||||
Message(4,item->Name);
|
||||
}
|
||||
}
|
||||
@@ -4010,7 +4010,7 @@ void Client::UpdateLFP() {
|
||||
|
||||
uint16 Client::GetPrimarySkillValue()
|
||||
{
|
||||
SkillType skill = HIGHEST_SKILL; //because NULL == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
|
||||
SkillType skill = HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
|
||||
bool equiped = m_inv.GetItem(13);
|
||||
|
||||
if (!equiped)
|
||||
@@ -4715,7 +4715,7 @@ void Client::SetStartZone(uint32 zoneid, float x, float y, float z)
|
||||
|
||||
// check to make sure the zone is valid
|
||||
const char *target_zone_name = database.GetZoneName(zoneid);
|
||||
if(target_zone_name == NULL)
|
||||
if(target_zone_name == nullptr)
|
||||
return;
|
||||
|
||||
m_pp.binds[4].zoneId = zoneid;
|
||||
@@ -5556,8 +5556,8 @@ void Client::ProcessInspectRequest(Client* requestee, Client* requester) {
|
||||
insr->TargetID = requester->GetID();
|
||||
insr->playerid = requestee->GetID();
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const ItemInst* inst = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
const ItemInst* inst = nullptr;
|
||||
|
||||
for(int16 L = 0; L <= 20; L++) {
|
||||
inst = requestee->GetInv().GetItem(L);
|
||||
@@ -5991,9 +5991,9 @@ void Client::SendTargetCommand(uint32 EntityID)
|
||||
|
||||
void Client::LocateCorpse()
|
||||
{
|
||||
Corpse *ClosestCorpse = NULL;
|
||||
Corpse *ClosestCorpse = nullptr;
|
||||
if(!GetTarget())
|
||||
ClosestCorpse = entity_list.GetClosestCorpse(this, NULL);
|
||||
ClosestCorpse = entity_list.GetClosestCorpse(this, nullptr);
|
||||
else if(GetTarget()->IsCorpse())
|
||||
ClosestCorpse = entity_list.GetClosestCorpse(this, GetTarget()->CastToCorpse()->GetOwnerName());
|
||||
else
|
||||
@@ -6093,10 +6093,10 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
|
||||
pet.duration = pet_duration;
|
||||
pet.npc_id = record.npc_type;
|
||||
|
||||
NPCType *made_npc = NULL;
|
||||
NPCType *made_npc = nullptr;
|
||||
|
||||
const NPCType *npc_type = database.GetNPCType(pet.npc_id);
|
||||
if(npc_type == NULL) {
|
||||
if(npc_type == nullptr) {
|
||||
LogFile->write(EQEMuLog::Error, "Unknown npc type for doppelganger spell id: %d", spell_id);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
@@ -6154,14 +6154,14 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
|
||||
TempPets(true);
|
||||
|
||||
while(summon_count > 0) {
|
||||
NPCType *npc_dup = NULL;
|
||||
if(made_npc != NULL) {
|
||||
NPCType *npc_dup = nullptr;
|
||||
if(made_npc != nullptr) {
|
||||
npc_dup = new NPCType;
|
||||
memcpy(npc_dup, made_npc, sizeof(NPCType));
|
||||
}
|
||||
|
||||
NPC* npca = new NPC(
|
||||
(npc_dup!=NULL)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer
|
||||
(npc_dup!=nullptr)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer
|
||||
0,
|
||||
GetX()+swarm_pet_x[summon_count], GetY()+swarm_pet_y[summon_count],
|
||||
GetZ(), GetHeading(), FlyMode3);
|
||||
@@ -6183,7 +6183,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
|
||||
npca->GetSwarmInfo()->target = target->GetID();
|
||||
|
||||
//we allocated a new NPC type object, give the NPC ownership of that memory
|
||||
if(npc_dup != NULL)
|
||||
if(npc_dup != nullptr)
|
||||
npca->GiveNPCTypeData(npc_dup);
|
||||
|
||||
entity_list.AddNPC(npca);
|
||||
@@ -6900,7 +6900,7 @@ void Client::RemoveXTarget(Mob *m, bool OnlyAutoSlots)
|
||||
|
||||
XTargets[i].ID = 0;
|
||||
|
||||
SendXTargetPacket(i, NULL);
|
||||
SendXTargetPacket(i, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6998,7 +6998,23 @@ void Client::RemoveGroupXTargets()
|
||||
{
|
||||
XTargets[i].ID = 0;
|
||||
XTargets[i].Name[0] = 0;
|
||||
SendXTargetPacket(i, NULL);
|
||||
SendXTargetPacket(i, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Client::RemoveAutoXTargets()
|
||||
{
|
||||
if(!XTargettingAvailable())
|
||||
return;
|
||||
|
||||
for(int i = 0; i < GetMaxXTargets(); ++i)
|
||||
{
|
||||
if(XTargets[i].Type == Auto)
|
||||
{
|
||||
XTargets[i].ID = 0;
|
||||
XTargets[i].Name[0] = 0;
|
||||
SendXTargetPacket(i, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-10
@@ -238,7 +238,7 @@ public:
|
||||
void TradeRequestFailed(const EQApplicationPacket* app);
|
||||
void BuyTraderItem(TraderBuy_Struct* tbs,Client* trader,const EQApplicationPacket* app);
|
||||
void TraderUpdate(uint16 slot_id,uint32 trader_id);
|
||||
void FinishTrade(Mob* with, ServerPacket* qspack = NULL, bool finalizer = false);
|
||||
void FinishTrade(Mob* with, ServerPacket* qspack = nullptr, bool finalizer = false);
|
||||
void SendZonePoints();
|
||||
|
||||
void SendBuyerResults(char *SearchQuery, uint32 SearchID);
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
void SendPacketQueue(bool Block = true);
|
||||
void QueuePacket(const EQApplicationPacket* app, bool ack_req = true, CLIENT_CONN_STATUS = CLIENT_CONNECTINGALL, eqFilterType filter=FilterNone);
|
||||
void FastQueuePacket(EQApplicationPacket** app, bool ack_req = true, CLIENT_CONN_STATUS = CLIENT_CONNECTINGALL);
|
||||
void ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname=NULL);
|
||||
void ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname=nullptr);
|
||||
void ChannelMessageSend(const char* from, const char* to, uint8 chan_num, uint8 language, const char* message, ...);
|
||||
void ChannelMessageSend(const char* from, const char* to, uint8 chan_num, uint8 language, uint8 lang_skill, const char* message, ...);
|
||||
void Message(uint32 type, const char* message, ...);
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
|
||||
inline uint8 GetLanguageSkill(uint16 n) const { return m_pp.languages[n]; }
|
||||
|
||||
void SendPickPocketResponse(Mob *from, uint32 amt, int type, const Item_Struct* item = NULL);
|
||||
void SendPickPocketResponse(Mob *from, uint32 amt, int type, const Item_Struct* item = nullptr);
|
||||
|
||||
inline const char* GetLastName() const { return lastname; }
|
||||
|
||||
@@ -879,7 +879,7 @@ public:
|
||||
inline bool SaveTaskState()
|
||||
{ return (taskmanager ? taskmanager->SaveClientState(this, taskstate) : false); }
|
||||
|
||||
inline bool IsTaskStateLoaded() { return taskstate != NULL; }
|
||||
inline bool IsTaskStateLoaded() { return taskstate != nullptr; }
|
||||
|
||||
inline bool IsTaskActive(int TaskID)
|
||||
{ return (taskstate ? taskstate->IsTaskActive(TaskID) : false); }
|
||||
@@ -990,19 +990,19 @@ public:
|
||||
void AdventureFinish(bool win, int theme, int points);
|
||||
void SetAdventureData(char *data) { adv_data = data; }
|
||||
void ClearAdventureData() { safe_delete(adv_data); }
|
||||
bool HasAdventureData() { return adv_data != NULL; }
|
||||
bool HasAdventureData() { return adv_data != nullptr; }
|
||||
void ClearCurrentAdventure();
|
||||
void PendingAdventureRequest() { adventure_request_timer = new Timer(8000); }
|
||||
bool GetPendingAdventureRequest() const { return (adventure_request_timer != NULL); }
|
||||
bool GetPendingAdventureRequest() const { return (adventure_request_timer != nullptr); }
|
||||
void ClearPendingAdventureRequest() { safe_delete(adventure_request_timer); }
|
||||
void PendingAdventureCreate() { adventure_create_timer = new Timer(8000); }
|
||||
bool GetPendingAdventureCreate() const { return (adventure_create_timer != NULL); }
|
||||
bool GetPendingAdventureCreate() const { return (adventure_create_timer != nullptr); }
|
||||
void ClearPendingAdventureCreate() { safe_delete(adventure_create_timer); }
|
||||
void PendingAdventureLeave() { adventure_leave_timer = new Timer(8000); }
|
||||
bool GetPendingAdventureLeave() const { return (adventure_leave_timer != NULL); }
|
||||
bool GetPendingAdventureLeave() const { return (adventure_leave_timer != nullptr); }
|
||||
void ClearPendingAdventureLeave() { safe_delete(adventure_leave_timer); }
|
||||
void PendingAdventureDoorClick() { adventure_door_timer = new Timer(8000); }
|
||||
bool GetPendingAdventureDoorClick() const { return (adventure_door_timer != NULL); }
|
||||
bool GetPendingAdventureDoorClick() const { return (adventure_door_timer != nullptr); }
|
||||
void ClearPendingAdventureDoorClick() { safe_delete(adventure_door_timer); }
|
||||
void ClearPendingAdventureData();
|
||||
|
||||
@@ -1090,11 +1090,12 @@ public:
|
||||
bool IsXTarget(const Mob *m) const;
|
||||
bool IsClientXTarget(const Client *c) const;
|
||||
void UpdateClientXTarget(Client *c);
|
||||
void UpdateXTargetType(XTargetType Type, Mob *m, const char *Name = NULL);
|
||||
void UpdateXTargetType(XTargetType Type, Mob *m, const char *Name = nullptr);
|
||||
void AddAutoXTarget(Mob *m);
|
||||
void RemoveXTarget(Mob *m, bool OnlyAutoSlots);
|
||||
void SendXTargetPacket(uint32 Slot, Mob *m);
|
||||
void RemoveGroupXTargets();
|
||||
void RemoveAutoXTargets();
|
||||
void ShowXTargets(Client *c);
|
||||
void InitializeMercInfo();
|
||||
bool CheckCanHireMerc(Mob* merchant, uint32 template_id);
|
||||
|
||||
@@ -30,7 +30,7 @@ char ClientLogs::_buffer[MAX_CLIENT_LOG_MESSAGE_LENGTH+1];
|
||||
void ClientLogs::subscribe(EQEMuLog::LogIDs id, Client *c) {
|
||||
if(id >= EQEMuLog::MaxLogID)
|
||||
return;
|
||||
if(c == NULL)
|
||||
if(c == nullptr)
|
||||
return;
|
||||
|
||||
//make sure they arnt allready subscribed.
|
||||
@@ -52,7 +52,7 @@ void ClientLogs::subscribe(EQEMuLog::LogIDs id, Client *c) {
|
||||
void ClientLogs::unsubscribe(EQEMuLog::LogIDs id, Client *c) {
|
||||
if(id >= EQEMuLog::MaxLogID)
|
||||
return;
|
||||
if(c == NULL)
|
||||
if(c == nullptr)
|
||||
return;
|
||||
|
||||
vector<Client *>::iterator cur,end;
|
||||
@@ -67,7 +67,7 @@ void ClientLogs::unsubscribe(EQEMuLog::LogIDs id, Client *c) {
|
||||
}
|
||||
|
||||
void ClientLogs::subscribeAll(Client *c) {
|
||||
if(c == NULL)
|
||||
if(c == nullptr)
|
||||
return;
|
||||
int r;
|
||||
for(r = EQEMuLog::Status; r < EQEMuLog::MaxLogID; r++) {
|
||||
@@ -76,7 +76,7 @@ void ClientLogs::subscribeAll(Client *c) {
|
||||
}
|
||||
|
||||
void ClientLogs::unsubscribeAll(Client *c) {
|
||||
if(c == NULL)
|
||||
if(c == nullptr)
|
||||
return;
|
||||
int r;
|
||||
for(r = EQEMuLog::Status; r < EQEMuLog::MaxLogID; r++) {
|
||||
|
||||
@@ -1120,7 +1120,7 @@ int32 Client::CalcManaRegen()
|
||||
this->medding = true;
|
||||
regen = (((GetSkill(MEDITATE) / 10) + (clevel - (clevel / 4))) / 4) + 4;
|
||||
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
|
||||
CheckIncreaseSkill(MEDITATE, NULL, -5);
|
||||
CheckIncreaseSkill(MEDITATE, nullptr, -5);
|
||||
}
|
||||
else
|
||||
regen = 2 + spellbonuses.ManaRegen + itembonuses.ManaRegen;
|
||||
|
||||
+114
-114
@@ -451,7 +451,7 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
||||
case CLIENT_CONNECTED: {
|
||||
ClientPacketProc p;
|
||||
p = ConnectedOpcodes[opcode];
|
||||
if(p == NULL) {
|
||||
if(p == nullptr) {
|
||||
char buffer[64];
|
||||
app->build_header_dump(buffer);
|
||||
mlog(CLIENT__NET_ERR, "Unhandled incoming opcode: %s", buffer);
|
||||
@@ -933,7 +933,7 @@ void Client::CheatDetected(CheatTypes CheatType, float x, float y, float z)
|
||||
&& ((this->Admin() < RuleI(Zone, MQWarpExemptStatus)
|
||||
|| (RuleI(Zone, MQWarpExemptStatus)) == -1)))
|
||||
{
|
||||
char *hString = NULL;
|
||||
char *hString = nullptr;
|
||||
MakeAnyLenString(&hString, "/MQWarp(SS) with location %.2f, %.2f, %.2f, the target was shadow step exempt but we still found this suspicious.", GetX(), GetY(), GetZ());
|
||||
database.SetMQDetectionFlag(this->account_name,this->name, hString, zone->GetShortName());
|
||||
safe_delete_array(hString);
|
||||
@@ -944,7 +944,7 @@ void Client::CheatDetected(CheatTypes CheatType, float x, float y, float z)
|
||||
&& ((this->Admin() < RuleI(Zone, MQWarpExemptStatus)
|
||||
|| (RuleI(Zone, MQWarpExemptStatus)) == -1)))
|
||||
{
|
||||
char *hString = NULL;
|
||||
char *hString = nullptr;
|
||||
MakeAnyLenString(&hString, "/MQWarp(KB) with location %.2f, %.2f, %.2f, the target was Knock Back exempt but we still found this suspicious.", GetX(), GetY(), GetZ());
|
||||
database.SetMQDetectionFlag(this->account_name,this->name, hString, zone->GetShortName());
|
||||
safe_delete_array(hString);
|
||||
@@ -958,7 +958,7 @@ void Client::CheatDetected(CheatTypes CheatType, float x, float y, float z)
|
||||
{
|
||||
if(RuleB(Zone, MarkMQWarpLT))
|
||||
{
|
||||
char *hString = NULL;
|
||||
char *hString = nullptr;
|
||||
MakeAnyLenString(&hString, "/MQWarp(LT) with location %.2f, %.2f, %.2f, running fast but not fast enough to get killed, possibly: small warp, speed hack, excessive lag, marked as suspicious.", GetX(), GetY(), GetZ());
|
||||
database.SetMQDetectionFlag(this->account_name,this->name, hString, zone->GetShortName());
|
||||
safe_delete_array(hString);
|
||||
@@ -1003,7 +1003,7 @@ void Client::CheatDetected(CheatTypes CheatType, float x, float y, float z)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
char *hString = NULL;
|
||||
char *hString = nullptr;
|
||||
MakeAnyLenString(&hString, "Unhandled HackerDetection flag with location %.2f, %.2f, %.2f.", GetX(), GetY(), GetZ());
|
||||
database.SetMQDetectionFlag(this->account_name,this->name, hString, zone->GetShortName());
|
||||
safe_delete_array(hString);
|
||||
@@ -1240,7 +1240,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
|
||||
if(IsTracking() && ((x_pos!=ppu->x_pos) || (y_pos!=ppu->y_pos))){
|
||||
if(MakeRandomFloat(0, 100) < 70)//should be good
|
||||
CheckIncreaseSkill(TRACKING, NULL, -20);
|
||||
CheckIncreaseSkill(TRACKING, nullptr, -20);
|
||||
}
|
||||
|
||||
// Break Hide if moving without sneaking and set rewind timer if moved
|
||||
@@ -1278,7 +1278,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
#ifdef PACKET_UPDATE_MANAGER
|
||||
entity_list.QueueManaged(this,outapp,true,false);
|
||||
#else
|
||||
entity_list.QueueCloseClients(this,outapp,true,300,NULL,false);
|
||||
entity_list.QueueCloseClients(this,outapp,true,300,nullptr,false);
|
||||
#endif
|
||||
safe_delete(outapp);
|
||||
}
|
||||
@@ -1287,7 +1287,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
{
|
||||
if(zone->watermap->InLiquid(x_pos, y_pos, z_pos))
|
||||
{
|
||||
CheckIncreaseSkill(SWIMMING, NULL, -17);
|
||||
CheckIncreaseSkill(SWIMMING, nullptr, -17);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1316,7 +1316,7 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
|
||||
aa_los_them.x = 0;
|
||||
aa_los_them.y = 0;
|
||||
aa_los_them.z = 0;
|
||||
aa_los_them_mob = NULL;
|
||||
aa_los_them_mob = nullptr;
|
||||
}
|
||||
else if (app->pBuffer[0] == 1)
|
||||
{
|
||||
@@ -1348,7 +1348,7 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
|
||||
aa_los_them.x = 0;
|
||||
aa_los_them.y = 0;
|
||||
aa_los_them.z = 0;
|
||||
aa_los_them_mob = NULL;
|
||||
aa_los_them_mob = nullptr;
|
||||
los_status = false;
|
||||
}
|
||||
}
|
||||
@@ -1435,9 +1435,9 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
SetHoTT(0);
|
||||
UpdateXTargetType(TargetsTarget, NULL);
|
||||
UpdateXTargetType(TargetsTarget, nullptr);
|
||||
|
||||
Group *g = GetGroup();
|
||||
|
||||
@@ -1455,9 +1455,9 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
SetHoTT(0);
|
||||
UpdateXTargetType(TargetsTarget, NULL);
|
||||
UpdateXTargetType(TargetsTarget, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1470,7 +1470,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
else
|
||||
{
|
||||
SetHoTT(0);
|
||||
UpdateXTargetType(TargetsTarget, NULL);
|
||||
UpdateXTargetType(TargetsTarget, nullptr);
|
||||
}
|
||||
|
||||
Group *g = GetGroup();
|
||||
@@ -1498,7 +1498,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
outapp->pBuffer[4] = 0x0d;
|
||||
if(GetTarget())
|
||||
{
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
}
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
@@ -1519,7 +1519,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
outapp->pBuffer[4] = 0x0d;
|
||||
if(GetTarget())
|
||||
{
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
}
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
@@ -1543,12 +1543,12 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
else if(GetTarget()->GetBodyType() == BT_NoTarget2 || GetTarget()->GetBodyType() == BT_Special
|
||||
|| GetTarget()->GetBodyType() == BT_NoTarget)
|
||||
{
|
||||
char *hacker_str = NULL;
|
||||
char *hacker_str = nullptr;
|
||||
MakeAnyLenString(&hacker_str, "%s attempting to target something untargetable, %s bodytype: %i\n",
|
||||
GetName(), GetTarget()->GetName(), (int)GetTarget()->GetBodyType());
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacker_str, zone->GetShortName());
|
||||
safe_delete_array(hacker_str);
|
||||
SetTarget((Mob*)NULL);
|
||||
SetTarget((Mob*)nullptr);
|
||||
return;
|
||||
}
|
||||
else if(IsPortExempted())
|
||||
@@ -1568,28 +1568,28 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
{
|
||||
if(DistNoRoot(*GetTarget()) > (zone->newzone_data.maxclip*zone->newzone_data.maxclip))
|
||||
{
|
||||
char *hacker_str = NULL;
|
||||
char *hacker_str = nullptr;
|
||||
MakeAnyLenString(&hacker_str, "%s attempting to target something beyond the clip plane of %.2f units,"
|
||||
" from (%.2f, %.2f, %.2f) to %s (%.2f, %.2f, %.2f)", GetName(),
|
||||
(zone->newzone_data.maxclip*zone->newzone_data.maxclip),
|
||||
GetX(), GetY(), GetZ(), GetTarget()->GetName(), GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ());
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacker_str, zone->GetShortName());
|
||||
safe_delete_array(hacker_str);
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(DistNoRoot(*GetTarget()) > (zone->newzone_data.maxclip*zone->newzone_data.maxclip))
|
||||
{
|
||||
char *hacker_str = NULL;
|
||||
char *hacker_str = nullptr;
|
||||
MakeAnyLenString(&hacker_str, "%s attempting to target something beyond the clip plane of %.2f units,"
|
||||
" from (%.2f, %.2f, %.2f) to %s (%.2f, %.2f, %.2f)", GetName(),
|
||||
(zone->newzone_data.maxclip*zone->newzone_data.maxclip),
|
||||
GetX(), GetY(), GetZ(), GetTarget()->GetName(), GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ());
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacker_str, zone->GetShortName());
|
||||
safe_delete_array(hacker_str);
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1744,8 +1744,8 @@ void Client::Handle_OP_AdventureRequest(const EQApplicationPacket *app)
|
||||
|
||||
AdventureRequest_Struct* ars = (AdventureRequest_Struct*)app->pBuffer;
|
||||
uint8 group_members = 0;
|
||||
Raid *r = NULL;
|
||||
Group *g = NULL;
|
||||
Raid *r = nullptr;
|
||||
Group *g = nullptr;
|
||||
|
||||
if(IsRaidGrouped())
|
||||
{
|
||||
@@ -1796,7 +1796,7 @@ void Client::Handle_OP_AdventureRequest(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
|
||||
const char *c_name = NULL;
|
||||
const char *c_name = nullptr;
|
||||
c_name = r->GetClientNameByIndex(x);
|
||||
if(c_name)
|
||||
{
|
||||
@@ -1815,7 +1815,7 @@ void Client::Handle_OP_AdventureRequest(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
|
||||
const char *c_name = NULL;
|
||||
const char *c_name = nullptr;
|
||||
c_name = g->GetClientNameByIndex(x);
|
||||
if(c_name)
|
||||
{
|
||||
@@ -1937,7 +1937,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
ItemInst *myitem = GetInv().GetItem(pcs->slot);
|
||||
if(myitem == NULL) {
|
||||
if(myitem == nullptr) {
|
||||
LogFile->write(EQEMuLog::Error, "Consuming from empty slot %d", pcs->slot);
|
||||
return;
|
||||
}
|
||||
@@ -2235,7 +2235,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
//DeleteItemInInventory(slot_id, 1, false);
|
||||
//entity_list.MessageClose_StringID(this, true, 50, 0, DRINKING_MESSAGE, GetName(), item->Name);
|
||||
//Should add intoxication level to the PP at some point
|
||||
//CheckIncreaseSkill(ALCOHOL_TOLERANCE, NULL, 25);
|
||||
//CheckIncreaseSkill(ALCOHOL_TOLERANCE, nullptr, 25);
|
||||
}
|
||||
|
||||
if (m_pp.hunger_level > 6000)
|
||||
@@ -2392,7 +2392,7 @@ void Client::Handle_OP_AdventureMerchantPurchase(const EQApplicationPacket *app)
|
||||
|
||||
merchantid = tmp->CastToNPC()->MerchantType;
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
bool found = false;
|
||||
std::list<MerchantList> merlist = zone->merchanttable[merchantid];
|
||||
std::list<MerchantList>::const_iterator itr;
|
||||
@@ -2741,7 +2741,7 @@ void Client::Handle_OP_Begging(const EQApplicationPacket *app)
|
||||
}
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
CheckIncreaseSkill(BEGGING, NULL, -10);
|
||||
CheckIncreaseSkill(BEGGING, nullptr, -10);
|
||||
}
|
||||
|
||||
void Client::Handle_OP_TestBuff(const EQApplicationPacket *app)
|
||||
@@ -2770,7 +2770,7 @@ void Client::Handle_OP_Surname(const EQApplicationPacket *app)
|
||||
|
||||
Surname_Struct* surname = (Surname_Struct*) app->pBuffer;
|
||||
|
||||
char *c = NULL;
|
||||
char *c = nullptr;
|
||||
bool first = true;
|
||||
for(c = surname->lastname; *c; c++)
|
||||
{
|
||||
@@ -3008,7 +3008,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
|
||||
{
|
||||
if(GetClientVersion() < EQClientSoF)
|
||||
{
|
||||
char *hack_str = NULL;
|
||||
char *hack_str = nullptr;
|
||||
MakeAnyLenString(&hack_str, "Player sent OP_SpawnAppearance with AT_Invis: %i", sa->parameter);
|
||||
database.SetMQDetectionFlag(this->account_name, this->name, hack_str, zone->GetShortName());
|
||||
safe_delete_array(hack_str);
|
||||
@@ -3107,7 +3107,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
|
||||
{
|
||||
if(!HasSkill(SNEAK))
|
||||
{
|
||||
char *hack_str = NULL;
|
||||
char *hack_str = nullptr;
|
||||
MakeAnyLenString(&hack_str, "Player sent OP_SpawnAppearance with AT_Sneak: %i", sa->parameter);
|
||||
database.SetMQDetectionFlag(this->account_name, this->name, hack_str, zone->GetShortName());
|
||||
safe_delete_array(hack_str);
|
||||
@@ -3119,7 +3119,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
|
||||
}
|
||||
else if (sa->type == AT_Size)
|
||||
{
|
||||
char *hack_str = NULL;
|
||||
char *hack_str = nullptr;
|
||||
MakeAnyLenString(&hack_str, "Player sent OP_SpawnAppearance with AT_Size: %i", sa->parameter);
|
||||
database.SetMQDetectionFlag(this->account_name, this->name, hack_str, zone->GetShortName());
|
||||
safe_delete_array(hack_str);
|
||||
@@ -3340,7 +3340,7 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app)
|
||||
{
|
||||
if(mi->from_slot != mi->to_slot && (mi->from_slot < 30 || mi->from_slot > 39) && IsValidSlot(mi->from_slot) && IsValidSlot(mi->to_slot))
|
||||
{
|
||||
char *detect = NULL;
|
||||
char *detect = nullptr;
|
||||
const ItemInst *itm_from = GetInv().GetItem(mi->from_slot);
|
||||
const ItemInst *itm_to = GetInv().GetItem(mi->to_slot);
|
||||
MakeAnyLenString(&detect, "Player issued a move item from %u(item id %u) to %u(item id %u) while casting %u.",
|
||||
@@ -3463,7 +3463,7 @@ void Client::Handle_OP_FeignDeath(const EQApplicationPacket *app)
|
||||
SetFeigned(true);
|
||||
}
|
||||
|
||||
CheckIncreaseSkill(FEIGN_DEATH, NULL, 5);
|
||||
CheckIncreaseSkill(FEIGN_DEATH, nullptr, 5);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3493,7 +3493,7 @@ void Client::Handle_OP_Sneak(const EQApplicationPacket *app)
|
||||
safe_delete(outapp);
|
||||
}
|
||||
else {
|
||||
CheckIncreaseSkill(SNEAK, NULL, 5);
|
||||
CheckIncreaseSkill(SNEAK, nullptr, 5);
|
||||
}
|
||||
float hidechance = ((GetSkill(SNEAK)/300.0f) + .25) * 100;
|
||||
float random = MakeRandomFloat(0, 99);
|
||||
@@ -3539,7 +3539,7 @@ void Client::Handle_OP_Hide(const EQApplicationPacket *app)
|
||||
|
||||
float hidechance = ((GetSkill(HIDE)/250.0f) + .25) * 100;
|
||||
float random = MakeRandomFloat(0, 100);
|
||||
CheckIncreaseSkill(HIDE, NULL, 5);
|
||||
CheckIncreaseSkill(HIDE, nullptr, 5);
|
||||
if (random < hidechance) {
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct));
|
||||
SpawnAppearance_Struct* sa_out = (SpawnAppearance_Struct*)outapp->pBuffer;
|
||||
@@ -3694,7 +3694,7 @@ void Client::Handle_OP_GMZoneRequest(const EQApplicationPacket *app)
|
||||
if (gmzr->zone_id == 0)
|
||||
zid = zonesummon_id;
|
||||
const char * zname = database.GetZoneName(zid);
|
||||
if(zname == NULL)
|
||||
if(zname == nullptr)
|
||||
tarzone[0] = 0;
|
||||
else
|
||||
strcpy(tarzone, zname);
|
||||
@@ -4754,7 +4754,7 @@ void Client::Handle_OP_DeleteItem(const EQApplicationPacket *app)
|
||||
const ItemInst *inst = GetInv().GetItem(alc->from_slot);
|
||||
if (inst && inst->GetItem()->ItemType == ItemTypeAlcohol) {
|
||||
entity_list.MessageClose_StringID(this, true, 50, 0, DRINKING_MESSAGE, GetName(), inst->GetItem()->Name);
|
||||
CheckIncreaseSkill(ALCOHOL_TOLERANCE, NULL, 25);
|
||||
CheckIncreaseSkill(ALCOHOL_TOLERANCE, nullptr, 25);
|
||||
|
||||
int16 AlcoholTolerance = GetSkill(ALCOHOL_TOLERANCE);
|
||||
int16 IntoxicationIncrease;
|
||||
@@ -4800,7 +4800,7 @@ void Client::Handle_OP_Taunt(const EQApplicationPacket *app)
|
||||
}
|
||||
p_timers.Start(pTimerTaunt, TauntReuseTime-1);
|
||||
|
||||
if(GetTarget() == NULL || !GetTarget()->IsNPC())
|
||||
if(GetTarget() == nullptr || !GetTarget()->IsNPC())
|
||||
return;
|
||||
|
||||
Taunt(GetTarget()->CastToNPC(), false);
|
||||
@@ -5368,7 +5368,7 @@ void Client::Handle_OP_GMGoto(const EQApplicationPacket *app)
|
||||
}
|
||||
GMSummon_Struct* gmg = (GMSummon_Struct*) app->pBuffer;
|
||||
Mob* gt = entity_list.GetMob(gmg->charname);
|
||||
if (gt != NULL) {
|
||||
if (gt != nullptr) {
|
||||
this->MovePC(zone->GetZoneID(), zone->GetInstanceID(), gt->GetX(), gt->GetY(), gt->GetZ(), gt->GetHeading());
|
||||
}
|
||||
else if (!worldserver.Connected())
|
||||
@@ -5414,7 +5414,7 @@ void Client::Handle_OP_TraderShop(const EQApplicationPacket *app)
|
||||
outtcs->Approval = Customer->WithCustomer(GetID());
|
||||
else {
|
||||
_log(TRADING__CLIENT, "Client::Handle_OP_TraderShop: entity_list.GetClientByID(tcs->traderid)"
|
||||
" returned a NULL pointer");
|
||||
" returned a nullptr pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5623,7 +5623,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
}
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
uint32 prevcharges = 0;
|
||||
if (item_id == 0) { //check to see if its on the temporary table
|
||||
std::list<TempMerchantList> tmp_merlist = zone->tmpmerchanttable[tmp->GetNPCTypeID()];
|
||||
@@ -5695,7 +5695,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
|
||||
|
||||
if(!TakeMoneyFromPP(mpo->price))
|
||||
{
|
||||
char *hacker_str = NULL;
|
||||
char *hacker_str = nullptr;
|
||||
MakeAnyLenString(&hacker_str, "Vendor Cheat: attempted to buy %i of %i: %s that cost %d cp but only has %d pp %d gp %d sp %d cp\n",
|
||||
mpo->quantity, item->ID, item->Name,
|
||||
mpo->price, m_pp.platinum, m_pp.gold, m_pp.silver, m_pp.copper);
|
||||
@@ -5712,7 +5712,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
|
||||
|
||||
//make sure we are not completely full...
|
||||
if(freeslotid == SLOT_CURSOR) {
|
||||
if(m_inv.GetItem(SLOT_CURSOR) != NULL) {
|
||||
if(m_inv.GetItem(SLOT_CURSOR) != nullptr) {
|
||||
Message(13, "You do not have room for any more items.");
|
||||
safe_delete(outapp);
|
||||
safe_delete(inst);
|
||||
@@ -5981,7 +5981,7 @@ void Client::Handle_OP_CloseContainer(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
SetTradeskillObject(NULL);
|
||||
SetTradeskillObject(nullptr);
|
||||
|
||||
ClickObjectAck_Struct* oos = (ClickObjectAck_Struct*)app->pBuffer;
|
||||
Entity* entity = entity_list.GetEntityObject(oos->drop_id);
|
||||
@@ -6036,7 +6036,7 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
SetTradeskillObject(NULL);
|
||||
SetTradeskillObject(nullptr);
|
||||
|
||||
EQApplicationPacket end_trade1(OP_FinishWindow, 0);
|
||||
QueuePacket(&end_trade1);
|
||||
@@ -6129,7 +6129,7 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app)
|
||||
" LEFT JOIN tradeskill_recipe_entries AS tre ON tr.id=tre.recipe_id "
|
||||
" LEFT JOIN (SELECT recipe_id, madecount FROM char_recipe_list WHERE char_id = %u) AS crl ON tr.id=crl.recipe_id "
|
||||
" WHERE tr.id IN (%s) "
|
||||
" AND tr.must_learn & 0x20 <> 0x20 AND ((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT NULL) OR (tr.must_learn & 0x3 = 0)) "
|
||||
" AND tr.must_learn & 0x20 <> 0x20 AND ((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT nullptr) OR (tr.must_learn & 0x3 = 0)) "
|
||||
" GROUP BY tr.id "
|
||||
" HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 "
|
||||
" LIMIT 100 ", CharacterID(), buf, containers);
|
||||
@@ -6184,7 +6184,7 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app)
|
||||
" LEFT JOIN tradeskill_recipe_entries AS tre ON tr.id=tre.recipe_id "
|
||||
" LEFT JOIN (SELECT recipe_id, madecount FROM char_recipe_list WHERE char_id = %u) AS crl ON tr.id=crl.recipe_id "
|
||||
" WHERE %s tr.trivial >= %u AND tr.trivial <= %u "
|
||||
" AND tr.must_learn & 0x20 <> 0x20 AND((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT NULL) OR (tr.must_learn & 0x3 = 0)) "
|
||||
" AND tr.must_learn & 0x20 <> 0x20 AND((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT nullptr) OR (tr.must_learn & 0x3 = 0)) "
|
||||
" GROUP BY tr.id "
|
||||
" HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 "
|
||||
" LIMIT 200 "
|
||||
@@ -6231,7 +6231,7 @@ void Client::Handle_OP_TradeSkillCombine(const EQApplicationPacket *app)
|
||||
sizeof(NewCombine_Struct), app->size);
|
||||
return;
|
||||
}
|
||||
/*if (m_tradeskill_object == NULL) {
|
||||
/*if (m_tradeskill_object == nullptr) {
|
||||
Message(13, "Error: Server is not aware of the tradeskill container you are attempting to use");
|
||||
return;
|
||||
}*/
|
||||
@@ -6253,7 +6253,7 @@ void Client::Handle_OP_ItemName(const EQApplicationPacket *app)
|
||||
}
|
||||
ItemNamePacket_Struct *p = (ItemNamePacket_Struct*)app->pBuffer;
|
||||
const Item_Struct *item = 0;
|
||||
if ((item = database.GetItem(p->item_id))!=NULL) {
|
||||
if ((item = database.GetItem(p->item_id))!=nullptr) {
|
||||
EQApplicationPacket* outapp=new EQApplicationPacket(OP_ItemName,sizeof(ItemNamePacket_Struct));
|
||||
p=(ItemNamePacket_Struct*)outapp->pBuffer;
|
||||
memset(p, 0, sizeof(ItemNamePacket_Struct));
|
||||
@@ -6270,7 +6270,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
sizeof(AugmentItem_Struct), app->size);
|
||||
return;
|
||||
}
|
||||
/*if (m_tradeskill_object == NULL) {
|
||||
/*if (m_tradeskill_object == nullptr) {
|
||||
Message(13, "Error: Server is not aware of the tradeskill container you are attempting to use");
|
||||
return;
|
||||
}*/
|
||||
@@ -6418,7 +6418,7 @@ void Client::Handle_OP_GroupCancelInvite(const EQApplicationPacket *app)
|
||||
GroupCancel_Struct* gf = (GroupCancel_Struct*) app->pBuffer;
|
||||
Mob* inviter = entity_list.GetClientByName(gf->name1);
|
||||
|
||||
if(inviter != NULL)
|
||||
if(inviter != nullptr)
|
||||
{
|
||||
if(inviter->IsClient())
|
||||
inviter->CastToClient()->QueuePacket(app);
|
||||
@@ -6458,7 +6458,7 @@ void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app)
|
||||
GroupGeneric_Struct* gf = (GroupGeneric_Struct*) app->pBuffer;
|
||||
Mob* inviter = entity_list.GetClientByName(gf->name1);
|
||||
|
||||
if(inviter != NULL && inviter->IsClient()) {
|
||||
if(inviter != nullptr && inviter->IsClient()) {
|
||||
isgrouped = true;
|
||||
strn0cpy(gf->name1,inviter->GetName(), 64);
|
||||
strn0cpy(gf->name2,this->GetName(), 64);
|
||||
@@ -6606,7 +6606,7 @@ void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app)
|
||||
worldserver.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
else if(inviter == NULL)
|
||||
else if(inviter == nullptr)
|
||||
{
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_GroupFollow, sizeof(ServerGroupFollow_Struct));
|
||||
ServerGroupFollow_Struct *sgfs = (ServerGroupFollow_Struct *)pack->pBuffer;
|
||||
@@ -6632,7 +6632,7 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
|
||||
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
if(raid){
|
||||
Mob* memberToDisband = NULL;
|
||||
Mob* memberToDisband = nullptr;
|
||||
|
||||
if(!raid->IsGroupLeader(GetName()))
|
||||
memberToDisband = this;
|
||||
@@ -6699,10 +6699,10 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
|
||||
#endif
|
||||
if((group->IsLeader(this) && (GetTarget() == 0 || GetTarget() == this)) || (group->GroupCount()<3)) {
|
||||
group->DisbandGroup();
|
||||
if(GetMerc() != NULL)
|
||||
if(GetMerc() != nullptr)
|
||||
GetMerc()->Suspend();
|
||||
} else {
|
||||
Mob* memberToDisband = NULL;
|
||||
Mob* memberToDisband = nullptr;
|
||||
memberToDisband = GetTarget();
|
||||
|
||||
if(!memberToDisband)
|
||||
@@ -6746,13 +6746,13 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
|
||||
// ...but other members can only remove themselves
|
||||
group->DelMember(this,false);
|
||||
|
||||
if(!IsGrouped() && GetMerc() != NULL) {
|
||||
if(!IsGrouped() && GetMerc() != nullptr) {
|
||||
if(!IsGrouped()) {
|
||||
Group *g = new Group(this);
|
||||
|
||||
if(!g) {
|
||||
delete g;
|
||||
g = NULL;
|
||||
g = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6819,7 +6819,7 @@ void Client::Handle_OP_GMEmoteZone(const EQApplicationPacket *app)
|
||||
if(strstr(gmez->text,"^")==0)
|
||||
entity_list.Message(0, 15, gmez->text);
|
||||
else{
|
||||
for(newmessage = strtok((char*)gmez->text,"^");newmessage!=NULL;newmessage=strtok(NULL, "^"))
|
||||
for(newmessage = strtok((char*)gmez->text,"^");newmessage!=nullptr;newmessage=strtok(nullptr, "^"))
|
||||
entity_list.Message(0, 15, newmessage);
|
||||
}
|
||||
return;
|
||||
@@ -6859,11 +6859,11 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) {
|
||||
EQApplicationPacket* outapp = app->Copy();
|
||||
InspectResponse_Struct* insr = (InspectResponse_Struct*) outapp->pBuffer;
|
||||
Mob* tmp = entity_list.GetMob(insr->TargetID);
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
|
||||
for (int16 L = 0; L <= 20; L++) {
|
||||
const ItemInst* inst = GetInv().GetItem(L);
|
||||
item = inst ? inst->GetItem() : NULL;
|
||||
item = inst ? inst->GetItem() : nullptr;
|
||||
|
||||
if(item) {
|
||||
strcpy(insr->itemnames[L], item->Name);
|
||||
@@ -6873,7 +6873,7 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) {
|
||||
}
|
||||
|
||||
const ItemInst* inst = GetInv().GetItem(21);
|
||||
item = inst ? inst->GetItem() : NULL;
|
||||
item = inst ? inst->GetItem() : nullptr;
|
||||
|
||||
if(item) {
|
||||
strcpy(insr->itemnames[22], item->Name);
|
||||
@@ -7148,7 +7148,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 3) || mypet->GetPetType() != petAnimation) {
|
||||
mypet->Say_StringID(MT_PetResponse, PET_CALMING);
|
||||
mypet->WipeHateList();
|
||||
mypet->SetTarget(NULL);
|
||||
mypet->SetTarget(nullptr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -7168,7 +7168,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->BuffFadeByEffect(SE_Charm);
|
||||
break;
|
||||
} else {
|
||||
SetPet(NULL);
|
||||
SetPet(nullptr);
|
||||
}
|
||||
|
||||
mypet->Say_StringID(MT_PetResponse, PET_GETLOST_STRING);
|
||||
@@ -7719,7 +7719,7 @@ void Client::Handle_OP_Mend(const EQApplicationPacket *app)
|
||||
Message_StringID(4,MEND_FAIL);
|
||||
}
|
||||
|
||||
CheckIncreaseSkill(MEND, NULL, 10);
|
||||
CheckIncreaseSkill(MEND, nullptr, 10);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8160,7 +8160,7 @@ void Client::Handle_OP_Track(const EQApplicationPacket *app)
|
||||
if( GetSkill(TRACKING)==0 )
|
||||
SetSkill(TRACKING,1);
|
||||
else
|
||||
CheckIncreaseSkill(TRACKING, NULL, 15);
|
||||
CheckIncreaseSkill(TRACKING, nullptr, 15);
|
||||
|
||||
if(!entity_list.MakeTrackPacket(this))
|
||||
LogFile->write(EQEMuLog::Error, "Unable to generate OP_Track packet requested by client.");
|
||||
@@ -8219,7 +8219,7 @@ void Client::Handle_OP_Split(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
Group *cgroup = GetGroup();
|
||||
if(cgroup == NULL) {
|
||||
if(cgroup == nullptr) {
|
||||
//invalid group, not sure if we should say more...
|
||||
Message(13, "You can not split money if your not in a group.");
|
||||
return;
|
||||
@@ -8263,7 +8263,7 @@ void Client::Handle_OP_SenseTraps(const EQApplicationPacket *app)
|
||||
|
||||
Trap* trap = entity_list.FindNearbyTrap(this,800);
|
||||
|
||||
CheckIncreaseSkill(SENSE_TRAPS, NULL);
|
||||
CheckIncreaseSkill(SENSE_TRAPS, nullptr);
|
||||
|
||||
if (trap && trap->skill > 0) {
|
||||
int uskill = GetSkill(SENSE_TRAPS);
|
||||
@@ -8349,7 +8349,7 @@ void Client::Handle_OP_DisarmTraps(const EQApplicationPacket *app)
|
||||
Message(MT_Skills,"You failed to disarm a trap.");
|
||||
}
|
||||
}
|
||||
CheckIncreaseSkill(DISARM_TRAPS, NULL);
|
||||
CheckIncreaseSkill(DISARM_TRAPS, nullptr);
|
||||
return;
|
||||
}
|
||||
Message(MT_Skills,"You did not find any traps close enough to disarm.");
|
||||
@@ -8534,7 +8534,7 @@ void Client::Handle_OP_ControlBoat(const EQApplicationPacket *app)
|
||||
|
||||
if(!boat->IsNPC() || (boat->GetRace() != CONTROLLED_BOAT && boat->GetRace() != 502))
|
||||
{
|
||||
char *hacked_string = NULL;
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "OP_Control Boat was sent against %s which is of race %u", boat->GetName(), boat->GetRace());
|
||||
database.SetMQDetectionFlag(this->AccountName(), this->GetName(), hacked_string, zone->GetShortName());
|
||||
safe_delete_array(hacked_string);
|
||||
@@ -8572,7 +8572,7 @@ void Client::Handle_OP_SetRunMode(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_SafeFallSuccess(const EQApplicationPacket *app) // bit of a misnomer, sent whenever safe fall is used (success of fail)
|
||||
{
|
||||
if(HasSkill(SAFE_FALL)) //this should only get called if the client has safe fall, but just in case...
|
||||
CheckIncreaseSkill(SAFE_FALL, NULL); //check for skill up
|
||||
CheckIncreaseSkill(SAFE_FALL, nullptr); //check for skill up
|
||||
}
|
||||
|
||||
void Client::Handle_OP_Heartbeat(const EQApplicationPacket *app)
|
||||
@@ -8599,7 +8599,7 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
|
||||
Message(13, "Searched for NPC ID: %d\n", t->npc_id);
|
||||
Mob* target = entity_list.GetMob(t->npc_id);
|
||||
|
||||
if(target == NULL) {
|
||||
if(target == nullptr) {
|
||||
//empty length packet == not found.
|
||||
EQApplicationPacket outapp(OP_FindPersonReply, 0);
|
||||
QueuePacket(&outapp);
|
||||
@@ -8631,7 +8631,7 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
|
||||
VERTEX Start(GetX(), GetY(), GetZ() + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION);
|
||||
VERTEX End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(Start, End, 1.0f, NULL, NULL) && zone->pathing->NoHazards(Start, End))
|
||||
if(!zone->zonemap->LineIntersectsZone(Start, End, 1.0f, nullptr, nullptr) && zone->pathing->NoHazards(Start, End))
|
||||
{
|
||||
points.resize(2);
|
||||
points[0].x = Start.x;
|
||||
@@ -8861,7 +8861,7 @@ bool Client::FinishConnState2(DBAsyncWork* dbaw) {
|
||||
drakkin_details = m_pp.drakkin_details;
|
||||
|
||||
//if we zone in with invalid Z, fix it.
|
||||
if (zone->zonemap != NULL) {
|
||||
if (zone->zonemap != nullptr) {
|
||||
|
||||
//for whatever reason, LineIntersectsNode is giving better results than FindBestZ
|
||||
|
||||
@@ -8875,20 +8875,20 @@ bool Client::FinishConnState2(DBAsyncWork* dbaw) {
|
||||
VERTEX hit;
|
||||
VERTEX below_me(me);
|
||||
below_me.z -= 500;
|
||||
if(!zone->zonemap->LineIntersectsNode(pnode, me, below_me, &hit, NULL) || hit.z < -5000) {
|
||||
if(!zone->zonemap->LineIntersectsNode(pnode, me, below_me, &hit, nullptr) || hit.z < -5000) {
|
||||
#if EQDEBUG >= 5
|
||||
LogFile->write(EQEMuLog::Debug, "Player %s started below the zone trying to fix! (%.3f, %.3f, %.3f)", GetName(), me.x, me.y, me.z);
|
||||
#endif
|
||||
//theres nothing below us... try to find something to stand on
|
||||
me.z += 200; //arbitrary #
|
||||
if(zone->zonemap->LineIntersectsNode(pnode, me, below_me, &hit, NULL)) {
|
||||
if(zone->zonemap->LineIntersectsNode(pnode, me, below_me, &hit, nullptr)) {
|
||||
//+10 so they dont stick in the ground
|
||||
SendTo(me.x, me.y, hit.z + 10);
|
||||
m_pp.z = hit.z + 10;
|
||||
} else {
|
||||
//one more, desperate try
|
||||
me.z += 2000;
|
||||
if(zone->zonemap->LineIntersectsNode(pnode, me, below_me, &hit, NULL)) {
|
||||
if(zone->zonemap->LineIntersectsNode(pnode, me, below_me, &hit, nullptr)) {
|
||||
//+10 so they dont stick in the ground
|
||||
SendTo(me.x, me.y, hit.z + 10);
|
||||
m_pp.z = hit.z + 10;
|
||||
@@ -9082,7 +9082,7 @@ bool Client::FinishConnState2(DBAsyncWork* dbaw) {
|
||||
KeyRingLoad();
|
||||
|
||||
uint32 groupid = database.GetGroupID(GetName());
|
||||
Group* group = NULL;
|
||||
Group* group = nullptr;
|
||||
if(groupid > 0){
|
||||
group = entity_list.GetGroupByID(groupid);
|
||||
if(!group) { //nobody from our is here... start a new group
|
||||
@@ -9092,7 +9092,7 @@ bool Client::FinishConnState2(DBAsyncWork* dbaw) {
|
||||
else //error loading group members...
|
||||
{
|
||||
delete group;
|
||||
group = NULL;
|
||||
group = nullptr;
|
||||
}
|
||||
} //else, somebody from our group is already here...
|
||||
|
||||
@@ -9396,7 +9396,7 @@ void Client::CompleteConnect()
|
||||
if (GetHideMe()) Message(13, "[GM] You are currently hidden to all clients");
|
||||
|
||||
uint32 raidid = database.GetRaidID(GetName());
|
||||
Raid *raid = NULL;
|
||||
Raid *raid = nullptr;
|
||||
if(raidid > 0){
|
||||
raid = entity_list.GetRaidByID(raidid);
|
||||
if(!raid){
|
||||
@@ -9405,7 +9405,7 @@ void Client::CompleteConnect()
|
||||
entity_list.AddRaid(raid, raidid);
|
||||
}
|
||||
else
|
||||
raid = NULL;
|
||||
raid = nullptr;
|
||||
}
|
||||
if(raid){
|
||||
SetRaidGrouped(true);
|
||||
@@ -9587,7 +9587,7 @@ void Client::CompleteConnect()
|
||||
for(x=0;x<8;x++)
|
||||
SendWearChange(x);
|
||||
Mob *pet = GetPet();
|
||||
if(pet != NULL) {
|
||||
if(pet != nullptr) {
|
||||
for(x=0;x<8;x++)
|
||||
pet->SendWearChange(x);
|
||||
}
|
||||
@@ -9675,7 +9675,7 @@ void Client::CompleteConnect()
|
||||
|
||||
if(IsInAGuild())
|
||||
{
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), zone->GetZoneID(), time(NULL));
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), zone->GetZoneID(), time(nullptr));
|
||||
guild_mgr.RequestOnlineGuildMembers(this->CharacterID(), this->GuildID());
|
||||
}
|
||||
|
||||
@@ -9812,7 +9812,7 @@ void Client::Handle_OP_RequestTitles(const EQApplicationPacket *app)
|
||||
|
||||
EQApplicationPacket *outapp = title_manager.MakeTitlesPacket(this);
|
||||
|
||||
if(outapp != NULL)
|
||||
if(outapp != nullptr)
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
|
||||
@@ -9830,7 +9830,7 @@ void Client::Handle_OP_BankerChange(const EQApplicationPacket *app)
|
||||
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = NULL;
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(money) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
@@ -9838,7 +9838,7 @@ void Client::Handle_OP_BankerChange(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
EQApplicationPacket *outapp=new EQApplicationPacket(OP_BankerChange,NULL,sizeof(BankerChange_Struct));
|
||||
EQApplicationPacket *outapp=new EQApplicationPacket(OP_BankerChange,nullptr,sizeof(BankerChange_Struct));
|
||||
BankerChange_Struct *bc=(BankerChange_Struct *)outapp->pBuffer;
|
||||
|
||||
if(m_pp.platinum < 0)
|
||||
@@ -9996,11 +9996,11 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
if(g){//add us all
|
||||
uint32 freeGroup = r->GetFreeGroup();
|
||||
Client *addClient = NULL;
|
||||
Client *addClient = nullptr;
|
||||
for(int x = 0; x < 6; x++)
|
||||
{
|
||||
if(g->members[x]){
|
||||
Client *c = NULL;
|
||||
Client *c = nullptr;
|
||||
if(g->members[x]->IsClient())
|
||||
c = g->members[x]->CastToClient();
|
||||
else
|
||||
@@ -10049,7 +10049,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
|
||||
uint32 groupFree = r->GetFreeGroup(); //get a free group
|
||||
if(ig){ //if we already have a group then cycle through adding us...
|
||||
Client *addClientig = NULL;
|
||||
Client *addClientig = nullptr;
|
||||
for(int x = 0; x < 6; x++)
|
||||
{
|
||||
if(ig->members[x]){
|
||||
@@ -10060,7 +10060,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
if(ig->IsLeader(ig->members[x])){
|
||||
Client *c = NULL;
|
||||
Client *c = nullptr;
|
||||
if(ig->members[x]->IsClient())
|
||||
c = ig->members[x]->CastToClient();
|
||||
else
|
||||
@@ -10074,7 +10074,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
else{
|
||||
Client *c = NULL;
|
||||
Client *c = nullptr;
|
||||
if(ig->members[x]->IsClient())
|
||||
c = ig->members[x]->CastToClient();
|
||||
else
|
||||
@@ -10098,7 +10098,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
r->AddMember(i,0xFFFFFFFF, true, false, true);
|
||||
}
|
||||
|
||||
Client *addClient = NULL;
|
||||
Client *addClient = nullptr;
|
||||
//now add the existing group
|
||||
for(int x = 0; x < 6; x++)
|
||||
{
|
||||
@@ -10112,7 +10112,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
if(g->IsLeader(g->members[x]))
|
||||
{
|
||||
Client *c = NULL;
|
||||
Client *c = nullptr;
|
||||
if(g->members[x]->IsClient())
|
||||
c = g->members[x]->CastToClient();
|
||||
else
|
||||
@@ -10127,7 +10127,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Client *c = NULL;
|
||||
Client *c = nullptr;
|
||||
if(g->members[x]->IsClient())
|
||||
c = g->members[x]->CastToClient();
|
||||
else
|
||||
@@ -10151,7 +10151,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
r = new Raid(i);
|
||||
entity_list.AddRaid(r);
|
||||
r->SetRaidDetails();
|
||||
Client *addClientig = NULL;
|
||||
Client *addClientig = nullptr;
|
||||
for(int x = 0; x < 6; x++)
|
||||
{
|
||||
if(ig->members[x])
|
||||
@@ -10164,7 +10164,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
if(ig->IsLeader(ig->members[x]))
|
||||
{
|
||||
Client *c = NULL;
|
||||
Client *c = nullptr;
|
||||
if(ig->members[x]->IsClient())
|
||||
c = ig->members[x]->CastToClient();
|
||||
else
|
||||
@@ -10180,7 +10180,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Client *c = NULL;
|
||||
Client *c = nullptr;
|
||||
if(ig->members[x]->IsClient())
|
||||
c = ig->members[x]->CastToClient();
|
||||
else
|
||||
@@ -10505,7 +10505,7 @@ void Client::Handle_OP_Translocate(const EQApplicationPacket *app) {
|
||||
|
||||
if(!PendingTranslocate) return;
|
||||
|
||||
if((RuleI(Spells, TranslocateTimeLimit) > 0) && (time(NULL) > (TranslocateTime + RuleI(Spells, TranslocateTimeLimit)))) {
|
||||
if((RuleI(Spells, TranslocateTimeLimit) > 0) && (time(nullptr) > (TranslocateTime + RuleI(Spells, TranslocateTimeLimit)))) {
|
||||
Message(13, "You did not accept the Translocate within the required time limit.");
|
||||
PendingTranslocate = false;
|
||||
return;
|
||||
@@ -10516,7 +10516,7 @@ void Client::Handle_OP_Translocate(const EQApplicationPacket *app) {
|
||||
int SpellID = PendingTranslocateData.SpellID;
|
||||
if(parse->SpellHasQuestSub(SpellID, "EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE"))
|
||||
{
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE, NULL, this, SpellID, 0);
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE, nullptr, this, SpellID, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -11135,7 +11135,7 @@ void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app) {
|
||||
float SuccessChance = (GetSkill(APPLY_POISON) + GetLevel()) / 400.0f;
|
||||
double ChanceRoll = MakeRandomFloat(0, 1);
|
||||
|
||||
CheckIncreaseSkill(APPLY_POISON, NULL, 10);
|
||||
CheckIncreaseSkill(APPLY_POISON, nullptr, 10);
|
||||
|
||||
if(ChanceRoll < SuccessChance) {
|
||||
ApplyPoisonSuccessResult = 1;
|
||||
@@ -11150,7 +11150,7 @@ void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app) {
|
||||
}
|
||||
}
|
||||
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_ApplyPoison, NULL, sizeof(ApplyPoison_Struct));
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_ApplyPoison, nullptr, sizeof(ApplyPoison_Struct));
|
||||
ApplyPoison_Struct* ApplyPoisonResult = (ApplyPoison_Struct*)outapp->pBuffer;
|
||||
ApplyPoisonResult->success = ApplyPoisonSuccessResult;
|
||||
ApplyPoisonResult->inventorySlot = ApplyPoisonData->inventorySlot;
|
||||
@@ -11178,7 +11178,7 @@ void Client::Handle_OP_AugmentInfo(const EQApplicationPacket *app) {
|
||||
}
|
||||
AugmentInfo_Struct* AugInfo = (AugmentInfo_Struct*) app->pBuffer;
|
||||
|
||||
char *outstring = NULL;
|
||||
char *outstring = nullptr;
|
||||
|
||||
const Item_Struct * item = database.GetItem(AugInfo->itemid);
|
||||
|
||||
@@ -11514,12 +11514,12 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app)
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result = NULL;
|
||||
MYSQL_RES *result = nullptr;
|
||||
MYSQL_ROW row = 0;
|
||||
float x(0),y(0),z(0);
|
||||
uint32 zoneid = 0;
|
||||
|
||||
uint32 StartCity = (uint32)strtol((const char*)app->pBuffer, NULL, 10);
|
||||
uint32 StartCity = (uint32)strtol((const char*)app->pBuffer, nullptr, 10);
|
||||
bool ValidCity = false;
|
||||
database.RunQuery
|
||||
(
|
||||
@@ -12425,7 +12425,7 @@ void Client::Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app)
|
||||
|
||||
BuffRemoveRequest_Struct *brrs = (BuffRemoveRequest_Struct*)app->pBuffer;
|
||||
|
||||
Mob *m = NULL;
|
||||
Mob *m = nullptr;
|
||||
|
||||
if(brrs->EntityID == GetID())
|
||||
m = this;
|
||||
@@ -12639,7 +12639,7 @@ void Client::Handle_OP_AltCurrencyMerchantRequest(const EQApplicationPacket *app
|
||||
ss << alt_cur_id << "|1|" << alt_cur_id;
|
||||
uint32 count = 0;
|
||||
uint32 merchant_id = tar->MerchantType;
|
||||
const Item_Struct *item = NULL;
|
||||
const Item_Struct *item = nullptr;
|
||||
|
||||
std::list<MerchantList> merlist = zone->merchanttable[merchant_id];
|
||||
std::list<MerchantList>::const_iterator itr;
|
||||
@@ -12703,7 +12703,7 @@ void Client::Handle_OP_AltCurrencySellSelection(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
uint32 cost = 0;
|
||||
uint32 current_currency = GetAlternateCurrencyValue(alt_cur_id);
|
||||
uint32 merchant_id = tar->MerchantType;
|
||||
@@ -12765,7 +12765,7 @@ void Client::Handle_OP_AltCurrencyPurchase(const EQApplicationPacket *app) {
|
||||
return;
|
||||
}
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
uint32 cost = 0;
|
||||
uint32 current_currency = GetAlternateCurrencyValue(alt_cur_id);
|
||||
uint32 merchant_id = tar->MerchantType;
|
||||
@@ -12882,7 +12882,7 @@ void Client::Handle_OP_AltCurrencySell(const EQApplicationPacket *app) {
|
||||
return;
|
||||
}
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
uint32 cost = 0;
|
||||
uint32 current_currency = GetAlternateCurrencyValue(alt_cur_id);
|
||||
uint32 merchant_id = tar->MerchantType;
|
||||
@@ -13176,7 +13176,7 @@ void Client::Handle_OP_XTargetRequest(const EQApplicationPacket *app)
|
||||
if(GetTarget())
|
||||
UpdateXTargetType(TargetsTarget, GetTarget()->GetTarget());
|
||||
else
|
||||
UpdateXTargetType(TargetsTarget, NULL);
|
||||
UpdateXTargetType(TargetsTarget, nullptr);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
+10
-10
@@ -233,7 +233,7 @@ bool Client::Process() {
|
||||
song_target = entity_list.GetMob(bardsong_target_id);
|
||||
}
|
||||
|
||||
if (song_target == NULL) {
|
||||
if (song_target == nullptr) {
|
||||
InterruptSpell(SONG_ENDS_ABRUPTLY, 0x121, bardsong);
|
||||
} else {
|
||||
if(!ApplyNextBardPulse(bardsong, song_target, bardsong_slot))
|
||||
@@ -348,7 +348,7 @@ bool Client::Process() {
|
||||
}
|
||||
|
||||
Mob *auto_attack_target = GetTarget();
|
||||
if (auto_attack && auto_attack_target != NULL && may_use_attacks && attack_timer.Check())
|
||||
if (auto_attack && auto_attack_target != nullptr && may_use_attacks && attack_timer.Check())
|
||||
{
|
||||
//check if change
|
||||
//only check on primary attack.. sorry offhand you gotta wait!
|
||||
@@ -486,7 +486,7 @@ bool Client::Process() {
|
||||
}
|
||||
}
|
||||
|
||||
if(auto_attack && may_use_attacks && auto_attack_target != NULL
|
||||
if(auto_attack && may_use_attacks && auto_attack_target != nullptr
|
||||
&& CanThisClassDualWield() && attack_dw_timer.Check())
|
||||
{
|
||||
// Range check
|
||||
@@ -844,7 +844,7 @@ void Client::BulkSendInventoryItems() {
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
mlog(INVENTORY__ERROR, "Incomplete Trade Transaction: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, false);
|
||||
database.SaveInventory(character_id, NULL, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
safe_delete(inst);
|
||||
}
|
||||
}
|
||||
@@ -981,7 +981,7 @@ void Client::BulkSendInventoryItems()
|
||||
#endif*/
|
||||
|
||||
void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
const Item_Struct* handyitem = NULL;
|
||||
const Item_Struct* handyitem = nullptr;
|
||||
uint32 numItemSlots=80; //The max number of items passed in the transaction.
|
||||
const Item_Struct *item;
|
||||
std::list<MerchantList> merlist = zone->merchanttable[merchant_id];
|
||||
@@ -1080,7 +1080,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
}
|
||||
//this resets the slot
|
||||
zone->tmpmerchanttable[npcid] = tmp_merlist;
|
||||
if(merch != NULL && handyitem){
|
||||
if(merch != nullptr && handyitem){
|
||||
char handy_id[8]={0};
|
||||
int greeting=MakeRandomInt(0, 4);
|
||||
int greet_id=0;
|
||||
@@ -1373,7 +1373,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = NULL;
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
@@ -1405,7 +1405,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = NULL;
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(shared coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
@@ -1461,7 +1461,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = NULL;
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
@@ -1505,7 +1505,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = NULL;
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(shared coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
|
||||
+122
-122
@@ -25,7 +25,7 @@
|
||||
3. In the command_init function you must add a call to command_add
|
||||
for your function. If you want an alias for your command, add
|
||||
a second call to command_add with the descriptin and access args
|
||||
set to NULL and 0 respectively since they aren't used when adding
|
||||
set to nullptr and 0 respectively since they aren't used when adding
|
||||
an alias. The function pointers being equal is makes it an alias.
|
||||
The access level you set with command_add is only a default if
|
||||
the command isn't listed in the addon.ini file.
|
||||
@@ -142,7 +142,7 @@ Access Levels:
|
||||
* When adding a command, if it's the first time that function pointer is
|
||||
* used it is a new command. If that function pointer is used for another
|
||||
* command, the command is added as an alias; description and access level
|
||||
* are not used and can be NULL.
|
||||
* are not used and can be nullptr.
|
||||
*
|
||||
*/
|
||||
int command_init(void) {
|
||||
@@ -165,7 +165,7 @@ int command_init(void) {
|
||||
command_add("numauths","- TODO: describe this command",200,command_numauths) ||
|
||||
command_add("setanim","[animnum] - Set target's appearance to animnum",200,command_setanim) ||
|
||||
command_add("connectworldserver","- Make zone attempt to connect to worldserver",200,command_connectworldserver) ||
|
||||
command_add("connectworld",NULL,0,command_connectworldserver) ||
|
||||
command_add("connectworld",nullptr,0,command_connectworldserver) ||
|
||||
command_add("serverinfo","- Get OS info about server host",200,command_serverinfo) ||
|
||||
command_add("crashtest","- Crash the zoneserver",200,command_crashtest) ||
|
||||
command_add("getvariable","[varname] - Get the value of a variable from the database",200,command_getvariable) ||
|
||||
@@ -181,7 +181,7 @@ int command_init(void) {
|
||||
command_add("zone","[zonename] [x] [y] [z] - Go to specified zone (coords optional)",50,command_zone) ||
|
||||
command_add("zoneinstance","[instanceid] [x] [y] [z] - Go to specified instance zone (coords optional)",50,command_zone_instance) ||
|
||||
command_add("peqzone","[zonename] - Go to specified zone, if you have > 75% health",0,command_peqzone) ||
|
||||
command_add("tgczone",NULL,0,command_peqzone) ||
|
||||
command_add("tgczone",nullptr,0,command_peqzone) ||
|
||||
command_add("showbuffs","- List buffs active on your target or you if no target",50,command_showbuffs) ||
|
||||
command_add("movechar","[charname] [zonename] - Move charname to zonename",50,command_movechar) ||
|
||||
command_add("viewpetition","[petition number] - View a petition",20,command_viewpetition) ||
|
||||
@@ -193,9 +193,9 @@ int command_init(void) {
|
||||
command_add("timezone","[HH] [MM] - Set timezone. Minutes are optional",90,command_timezone) ||
|
||||
command_add("synctod","- Send a time of day update to every client in zone",90,command_synctod) ||
|
||||
command_add("invulnerable","[on/off] - Turn player target's or your invulnerable flag on or off",80,command_invul) ||
|
||||
command_add("invul",NULL,0,command_invul) ||
|
||||
command_add("invul",nullptr,0,command_invul) ||
|
||||
command_add("hideme","[on/off] - Hide yourself from spawn lists.",80,command_hideme) ||
|
||||
command_add("gmhideme",NULL,0,command_hideme) ||
|
||||
command_add("gmhideme",nullptr,0,command_hideme) ||
|
||||
command_add("emote","['name'/'world'/'zone'] [type] [message] - Send an emote message",80,command_emote) ||
|
||||
command_add("fov","- Check wether you're behind or in your target's field of view",80,command_fov) ||
|
||||
command_add("manastat","- Report your or your target's cur/max mana",80,command_manastat) ||
|
||||
@@ -209,7 +209,7 @@ int command_init(void) {
|
||||
command_add("permagender","[gendernum] - Change your or your player target's gender (zone to take effect)",80,command_permagender) ||
|
||||
command_add("weather","[0/1/2/3] (Off/Rain/Snow/Manual) - Change the weather",80,command_weather) ||
|
||||
command_add("zheader","[zonename] - Load zheader for zonename from the database",80,command_zheader) ||
|
||||
command_add("zhdr",NULL,0,command_zheader) ||
|
||||
command_add("zhdr",nullptr,0,command_zheader) ||
|
||||
command_add("zsky","[skytype] - Change zone sky type",80,command_zsky) ||
|
||||
command_add("zcolor","[red] [green] [blue] - Change sky color",80,command_zcolor) ||
|
||||
command_add("zuwcoords","[z coord] - Set underworld coord",80,command_zuwcoords) ||
|
||||
@@ -238,14 +238,14 @@ int command_init(void) {
|
||||
command_add("flymode","[0/1/2] - Set your or your player target's flymode to off/on/levitate",50,command_flymode) ||
|
||||
command_add("showskills","- Show the values of your or your player target's skills",50,command_showskills) ||
|
||||
command_add("findspell","[searchstring] - Search for a spell",50,command_findspell) ||
|
||||
command_add("spfind",NULL,0,command_findspell) ||
|
||||
command_add("spfind",nullptr,0,command_findspell) ||
|
||||
command_add("castspell","[spellid] - Cast a spell",50,command_castspell) ||
|
||||
command_add("cast",NULL,0,command_castspell) ||
|
||||
command_add("cast",nullptr,0,command_castspell) ||
|
||||
command_add("setlanguage","[language ID] [value] - Set your target's language skillnum to value",50,command_setlanguage) ||
|
||||
command_add("setskill","[skillnum] [value] - Set your target's skill skillnum to value",50,command_setskill) ||
|
||||
command_add("setskillall","[value] - Set all of your target's skills to value",50,command_setskillall) ||
|
||||
command_add("setallskill",NULL,0,command_setskillall) ||
|
||||
command_add("setallskills",NULL,0,command_setskillall) ||
|
||||
command_add("setallskill",nullptr,0,command_setskillall) ||
|
||||
command_add("setallskills",nullptr,0,command_setskillall) ||
|
||||
command_add("race","[racenum] - Change your or your target's race. Use racenum 0 to return to normal",50,command_race) ||
|
||||
command_add("gender","[0/1/2] - Change your or your target's gender to male/female/neuter",50,command_gender) ||
|
||||
command_add("makepet","[level] [class] [race] [texture] - Make a pet",50,command_makepet) ||
|
||||
@@ -253,7 +253,7 @@ int command_init(void) {
|
||||
command_add("spawn","[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC",10,command_spawn) ||
|
||||
command_add("texture","[texture] [helmtexture] - Change your or your target's appearance, use 255 to show equipment",10,command_texture) ||
|
||||
command_add("npctypespawn","[npctypeid] [factionid] - Spawn an NPC from the db",10,command_npctypespawn) ||
|
||||
command_add("dbspawn",NULL,0,command_npctypespawn) ||
|
||||
command_add("dbspawn",nullptr,0,command_npctypespawn) ||
|
||||
command_add("heal","- Completely heal your target",10,command_heal) ||
|
||||
command_add("appearance","[type] [value] - Send an appearance packet for you or your target",150,command_appearance) ||
|
||||
command_add("charbackup","[list/restore] - Query or restore character backups",150,command_charbackup) ||
|
||||
@@ -261,17 +261,17 @@ int command_init(void) {
|
||||
command_add("peekinv","[worn/cursor/inv/bank/trade/trib/all] - Print out contents of your player target's inventory",100,command_peekinv) ||
|
||||
command_add("findnpctype","[search criteria] - Search database NPC types",100,command_findnpctype) ||
|
||||
command_add("findzone","[search criteria] - Search database zones",100,command_findzone) ||
|
||||
command_add("fz",NULL,100,command_findzone) ||
|
||||
command_add("fz",nullptr,100,command_findzone) ||
|
||||
command_add("viewnpctype","[npctype id] - Show info about an npctype",100,command_viewnpctype) ||
|
||||
command_add("reloadstatic","- Reload Static Zone Data",150,command_reloadstatic) ||
|
||||
command_add("reloadquest"," - Clear quest cache (any argument causes it to also stop all timers)",150,command_reloadqst) ||
|
||||
command_add("reloadqst",NULL,0,command_reloadqst) ||
|
||||
command_add("reloadpl",NULL,0,command_reloadqst) ||
|
||||
command_add("reloadworld",NULL,255,command_reloadworld) ||
|
||||
command_add("reloadlevelmods",NULL,255,command_reloadlevelmods) ||
|
||||
command_add("rq",NULL,0,command_reloadqst) ||
|
||||
command_add("reloadqst",nullptr,0,command_reloadqst) ||
|
||||
command_add("reloadpl",nullptr,0,command_reloadqst) ||
|
||||
command_add("reloadworld",nullptr,255,command_reloadworld) ||
|
||||
command_add("reloadlevelmods",nullptr,255,command_reloadlevelmods) ||
|
||||
command_add("rq",nullptr,0,command_reloadqst) ||
|
||||
command_add("reloadzonepoints","- Reload zone points from database",150,command_reloadzps) ||
|
||||
command_add("reloadzps",NULL,0,command_reloadzps) ||
|
||||
command_add("reloadzps",nullptr,0,command_reloadzps) ||
|
||||
command_add("zoneshutdown","[shortname] - Shut down a zone server",150,command_zoneshutdown) ||
|
||||
command_add("zonebootup","[ZoneServerID] [shortname] - Make a zone server boot a specific zone",150,command_zonebootup) ||
|
||||
command_add("kick","[charname] - Disconnect charname",150,command_kick) ||
|
||||
@@ -304,17 +304,17 @@ int command_init(void) {
|
||||
command_add("pvp","[on/off] - Set your or your player target's PVP status",100,command_pvp) ||
|
||||
command_add("setxp","[value] - Set your or your player target's experience",100,command_setxp) ||
|
||||
command_add("setpvppoints","[value] - Set your or your player target's PVP points",100,command_setpvppoints) ||
|
||||
command_add("setexp",NULL,0,command_setxp) ||
|
||||
command_add("setexp",nullptr,0,command_setxp) ||
|
||||
command_add("setaaxp","[value] - Set your or your player target's AA experience",100,command_setaaxp) ||
|
||||
command_add("setaaexp",NULL,0,command_setaaxp) ||
|
||||
command_add("setaaexp",nullptr,0,command_setaaxp) ||
|
||||
command_add("setaapts","[value] - Set your or your player target's available AA points",100,command_setaapts) ||
|
||||
command_add("setaapoints",NULL,0,command_setaapts) ||
|
||||
command_add("setaapoints",nullptr,0,command_setaapts) ||
|
||||
command_add("setcrystals","[value] - Set your or your player target's available radiant or ebon crystals",100,command_setcrystals) ||
|
||||
command_add("name","[newname] - Rename your player target",150,command_name) ||
|
||||
command_add("tempname","[newname] - Temporarily renames your target. Leave name blank to restore the original name.",100,command_tempname) ||
|
||||
command_add("npcspecialattk","[flagchar] [perm] - Set NPC special attack flags. Flags are E(nrage) F(lurry) R(ampage) S(ummon).",80,command_npcspecialattk) ||
|
||||
command_add("npcspecialattack",NULL,0,command_npcspecialattk) ||
|
||||
command_add("npcspecialatk",NULL,0,command_npcspecialattk) ||
|
||||
command_add("npcspecialattack",nullptr,0,command_npcspecialattk) ||
|
||||
command_add("npcspecialatk",nullptr,0,command_npcspecialattk) ||
|
||||
command_add("kill","- Kill your target",100,command_kill) ||
|
||||
command_add("haste","[percentage] - Set your haste percentage",100,command_haste) ||
|
||||
command_add("damage","[amount] - Damage your target",100,command_damage) ||
|
||||
@@ -335,14 +335,14 @@ int command_init(void) {
|
||||
command_add("uptime","[zone server id] - Get uptime of worldserver, or zone server if argument provided",10,command_uptime) ||
|
||||
command_add("flag","[status] [acctname] - Refresh your admin status, or set an account's admin status if arguments provided",0,command_flag) ||
|
||||
command_add("guild","- Guild manipulation commands. Use argument help for more info.",10,command_guild) ||
|
||||
command_add("guilds",NULL,0,command_guild) ||
|
||||
command_add("guilds",nullptr,0,command_guild) ||
|
||||
command_add("zonestatus","- Show connected zoneservers, synonymous with /servers",150,command_zonestatus) ||
|
||||
command_add("manaburn","- Use AA Wizard class skill manaburn on target",10,command_manaburn) ||
|
||||
command_add("viewmessage","[id] - View messages in your tell queue",100,command_viewmessage) ||
|
||||
command_add("viewmessages",NULL,0,command_viewmessage) ||
|
||||
command_add("viewmessages",nullptr,0,command_viewmessage) ||
|
||||
command_add("doanim","[animnum] [type] - Send an EmoteAnim for you or your target",50,command_doanim) ||
|
||||
command_add("randomfeatures","- Temporarily randomizes the Facial Features of your target",80,command_randomfeatures) ||
|
||||
command_add("rf",NULL,80,command_randomfeatures) ||
|
||||
command_add("rf",nullptr,80,command_randomfeatures) ||
|
||||
command_add("face","- Change the face of your target",80,command_face) ||
|
||||
command_add("helm","- Change the helm of your target",80,command_helm) ||
|
||||
command_add("hair","- Change the hair style of your target",80,command_hair) ||
|
||||
@@ -359,15 +359,15 @@ int command_init(void) {
|
||||
command_add("interrupt","[message id] [color] - Interrupt your casting. Arguments are optional.",50,command_interrupt) ||
|
||||
command_add("d1","[type] [spell] [damage] - Send an OP_Action packet with the specified values",200,command_d1) ||
|
||||
command_add("summonitem","[itemid] [charges] - Summon an item onto your cursor. Charges are optional.",200,command_summonitem) ||
|
||||
command_add("si",NULL,200,command_summonitem) ||
|
||||
command_add("si",nullptr,200,command_summonitem) ||
|
||||
command_add("giveitem","[itemid] [charges] - Summon an item onto your target's cursor. Charges are optional.",200,command_giveitem) ||
|
||||
command_add("gi",NULL,200,command_giveitem) ||
|
||||
command_add("gi",nullptr,200,command_giveitem) ||
|
||||
command_add("givemoney","[pp] [gp] [sp] [cp] - Gives specified amount of money to the target player.",200,command_givemoney) ||
|
||||
command_add("itemsearch","[search criteria] - Search for an item",10,command_itemsearch) ||
|
||||
command_add("search",NULL,10,command_itemsearch) ||
|
||||
command_add("search",nullptr,10,command_itemsearch) ||
|
||||
command_add("stun","[duration] - Stuns you or your target for duration",100,command_stun) ||
|
||||
command_add("finditem",NULL,10,command_itemsearch) ||
|
||||
command_add("fi",NULL,10,command_itemsearch) ||
|
||||
command_add("finditem",nullptr,10,command_itemsearch) ||
|
||||
command_add("fi",nullptr,10,command_itemsearch) ||
|
||||
#ifdef PACKET_PROFILER
|
||||
command_add("packetprofile","- Dump packet profile for target or self.",250,command_packetprofile) ||
|
||||
#endif
|
||||
@@ -385,7 +385,7 @@ int command_init(void) {
|
||||
command_add("oocmute","[1/0] - Mutes OOC chat",200,command_oocmute) ||
|
||||
command_add("revoke","[charname] [1/0] - Makes charname unable to talk on OOC",200,command_revoke) ||
|
||||
command_add("checklos","- Check for line of sight to your target",50,command_checklos) ||
|
||||
command_add("los",NULL,0,command_checklos) ||
|
||||
command_add("los",nullptr,0,command_checklos) ||
|
||||
command_add("setadventurepoints","- Set your or your player target's available adventure points",150,command_set_adventure_points) ||
|
||||
command_add("npcsay","[message] - Make your NPC target say a message.",150,command_npcsay) ||
|
||||
command_add("npcshout","[message] - Make your NPC target shout a message.",150,command_npcshout) ||
|
||||
@@ -523,7 +523,7 @@ void command_deinit(void)
|
||||
*/
|
||||
int command_add(const char *command_string, const char *desc, int access, CmdFuncPtr function)
|
||||
{
|
||||
if(function == NULL)
|
||||
if(function == nullptr)
|
||||
return(-1);
|
||||
|
||||
string cstr(command_string);
|
||||
@@ -541,7 +541,7 @@ int command_add(const char *command_string, const char *desc, int access, CmdFun
|
||||
if(cur->second->function == function) {
|
||||
int r;
|
||||
for(r = 1; r < CMDALIASES; r++) {
|
||||
if(cur->second->command[r] == NULL) {
|
||||
if(cur->second->command[r] == nullptr) {
|
||||
cur->second->command[r] = command_string;
|
||||
break;
|
||||
}
|
||||
@@ -595,7 +595,7 @@ int command_add_perl(const char *command_string, const char *desc, int access) {
|
||||
CommandRecord *c = new CommandRecord;
|
||||
c->desc = desc;
|
||||
c->access = access;
|
||||
c->function = NULL;
|
||||
c->function = nullptr;
|
||||
|
||||
commandlist[cstr] = c;
|
||||
|
||||
@@ -613,7 +613,7 @@ void command_clear_perl() {
|
||||
for(; cur != end;) {
|
||||
del = cur;
|
||||
cur++;
|
||||
if(del->second->function == NULL) {
|
||||
if(del->second->function == nullptr) {
|
||||
safe_delete(del->second);
|
||||
commandlist.erase(del);
|
||||
}
|
||||
@@ -662,7 +662,7 @@ int command_realdispatch(Client *c, const char *message)
|
||||
}
|
||||
#endif
|
||||
|
||||
if(cur->function == NULL) {
|
||||
if(cur->function == nullptr) {
|
||||
#ifdef EMBPERL_COMMANDS
|
||||
//todo reimplement this stuff
|
||||
//dispatch perl command
|
||||
@@ -931,7 +931,7 @@ void command_help(Client *c, const Seperator *sep)
|
||||
if(c->Admin() < cur->second->access)
|
||||
continue;
|
||||
commands_shown++;
|
||||
c->Message(0, " %c%s %s", COMMAND_CHAR, cur->first.c_str(), cur->second->desc == NULL?"":cur->second->desc);
|
||||
c->Message(0, " %c%s %s", COMMAND_CHAR, cur->first.c_str(), cur->second->desc == nullptr?"":cur->second->desc);
|
||||
}
|
||||
c->Message(0, "%d command%s listed.", commands_shown, commands_shown!=1?"s":"");
|
||||
|
||||
@@ -1018,7 +1018,7 @@ void command_wc(Client *c, const Seperator *sep)
|
||||
{
|
||||
c->Message(0, "Usage: #wc [wear slot] [material] [ [hero_forge_model] [elite_material] [unknown06] [unknown18] ]");
|
||||
}
|
||||
else if(c->GetTarget() == NULL) {
|
||||
else if(c->GetTarget() == nullptr) {
|
||||
c->Message(13, "You must have a target to do a wear change.");
|
||||
}
|
||||
else
|
||||
@@ -1155,7 +1155,7 @@ void command_showpetspell(Client *c, const Seperator *sep)
|
||||
strcpy(sName, spells[i].teleport_zone);
|
||||
strupr(sName);
|
||||
char* pdest = strstr(sName, sCriteria);
|
||||
if ((pdest != NULL) && (count <=20))
|
||||
if ((pdest != nullptr) && (count <=20))
|
||||
{
|
||||
c->Message(0, " %i: %s, %s", i, spells[i].teleport_zone, spells[i].name);
|
||||
count++;
|
||||
@@ -1819,7 +1819,7 @@ void command_emote(Client *c, const Seperator *sep)
|
||||
if(strstr(sep->arg[3],"^")==0)
|
||||
entity_list.Message(0, atoi(sep->arg[2]), sep->argplus[3]);
|
||||
else{
|
||||
for(newmessage = strtok((char*)sep->arg[3],"^");newmessage!=NULL;newmessage=strtok(NULL, "^"))
|
||||
for(newmessage = strtok((char*)sep->arg[3],"^");newmessage!=nullptr;newmessage=strtok(nullptr, "^"))
|
||||
entity_list.Message(0, atoi(sep->arg[2]), newmessage);
|
||||
}
|
||||
}
|
||||
@@ -2143,7 +2143,7 @@ void command_itemtest(Client *c, const Seperator *sep)
|
||||
{
|
||||
char chBuffer[8192] = {0};
|
||||
//Using this to determine new item layout
|
||||
FILE* f = NULL;
|
||||
FILE* f = nullptr;
|
||||
if (!(f = fopen("c:\\EQEMUcvs\\ItemDump.txt", "rb"))) {
|
||||
c->Message(13, "Error: Could not open c:\\EQEMUcvs\\ItemDump.txt");
|
||||
return;
|
||||
@@ -2569,7 +2569,7 @@ void command_findspell(Client *c, const Seperator *sep)
|
||||
|
||||
strupr(sName);
|
||||
char* pdest = strstr(sName, sCriteria);
|
||||
if ((pdest != NULL) && (count <=20)) {
|
||||
if ((pdest != nullptr) && (count <=20)) {
|
||||
c->Message(0, " %i: %s", i, spells[i].name);
|
||||
count++;
|
||||
}
|
||||
@@ -2678,7 +2678,7 @@ void command_setlanguage(Client *c, const Seperator *sep)
|
||||
|
||||
void command_setskill(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() == NULL) {
|
||||
if (c->GetTarget() == nullptr) {
|
||||
c->Message(0, "Error: #setskill: No target.");
|
||||
}
|
||||
else if (!c->GetTarget()->IsClient()) {
|
||||
@@ -2992,7 +2992,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
bool bAll = (strcasecmp(sep->arg[1], "all") == 0);
|
||||
bool bFound = false;
|
||||
Client* client = c->GetTarget()->CastToClient();
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
c->Message(0, "Displaying inventory for %s...", client->GetName());
|
||||
|
||||
if (bAll || (strcasecmp(sep->arg[1], "worn")==0)) {
|
||||
@@ -3000,7 +3000,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
bFound = true;
|
||||
for (int16 i=0; i<=21; i++) {
|
||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), "WornSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
||||
@@ -3022,7 +3022,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
bFound = true;
|
||||
for (int16 i=22; i<=29; i++) {
|
||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), "InvSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
||||
@@ -3041,7 +3041,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
for (uint8 j=0; j<10; j++) {
|
||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||
item = (instbag) ? instbag->GetItem() : NULL;
|
||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
||||
@@ -3064,7 +3064,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
if(c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
const ItemInst* inst = client->GetInv().GetItem(9999);
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
c->Message((item==0), "InvSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", 9999,
|
||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
||||
((item==0)?"null":item->Name), 0x12,
|
||||
@@ -3095,7 +3095,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
else {
|
||||
for(it=client->GetInv().cursor_begin();it!=client->GetInv().cursor_end();it++,i++) {
|
||||
const ItemInst* inst = *it;
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), "CursorSlot: %i, Depth: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", SLOT_CURSOR,i,
|
||||
@@ -3114,7 +3114,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
if (inst && inst->IsType(ItemClassContainer) && i==0) { // 'CSD 1' - only display contents of slot 30[0] container..higher ones don't exist
|
||||
for (uint8 j=0; j<10; j++) {
|
||||
const ItemInst* instbag = client->GetInv().GetItem(SLOT_CURSOR, j);
|
||||
item = (instbag) ? instbag->GetItem() : NULL;
|
||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
||||
@@ -3142,7 +3142,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
bFound = true;
|
||||
for (int16 i=TRIBUTE_SLOT_START; i<(TRIBUTE_SLOT_START + MAX_PLAYER_TRIBUTES); i++) {
|
||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), "TributeSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
||||
@@ -3166,7 +3166,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
int16 i = 0;
|
||||
for (i=2000; i<=2023; i++) {
|
||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), "BankSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
||||
@@ -3185,7 +3185,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
for (uint8 j=0; j<10; j++) {
|
||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||
item = (instbag) ? instbag->GetItem() : NULL;
|
||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
||||
@@ -3207,7 +3207,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
}
|
||||
for (i=2500; i<=2501; i++) {
|
||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), "ShBankSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
||||
@@ -3226,7 +3226,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
for (uint8 j=0; j<10; j++) {
|
||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||
item = (instbag) ? instbag->GetItem() : NULL;
|
||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), " ShBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
||||
@@ -3252,7 +3252,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
bFound = true;
|
||||
for (int16 i=3000; i<=3007; i++) {
|
||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||
item = (inst) ? inst->GetItem() : NULL;
|
||||
item = (inst) ? inst->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), "TradeSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
||||
@@ -3271,7 +3271,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
for (uint8 j=0; j<10; j++) {
|
||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||
item = (instbag) ? instbag->GetItem() : NULL;
|
||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||
if (c->GetClientVersion() >= EQClientSoF)
|
||||
{
|
||||
c->Message((item==0), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
||||
@@ -3697,7 +3697,7 @@ void command_equipitem(Client *c, const Seperator *sep)
|
||||
|
||||
// also send out a wear change packet?
|
||||
}
|
||||
else if (from_inst == NULL)
|
||||
else if (from_inst == nullptr)
|
||||
c->Message(13, "Error: There is no item on your cursor");
|
||||
else
|
||||
c->Message(13, "Error: Item on your cursor cannot be equipped");
|
||||
@@ -3919,7 +3919,7 @@ void command_fixmob(Client *c, const Seperator *sep)
|
||||
uint32 DrakkinTattoo = target->GetDrakkinTattoo();
|
||||
uint32 DrakkinDetails = target->GetDrakkinDetails();
|
||||
|
||||
const char* ChangeType = NULL; // If it's still NULL after processing, they didn't send a valid command
|
||||
const char* ChangeType = nullptr; // If it's still nullptr after processing, they didn't send a valid command
|
||||
uint32 ChangeSetting;
|
||||
char* command = sep->arg[1];
|
||||
|
||||
@@ -4087,7 +4087,7 @@ void command_fixmob(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
|
||||
if (ChangeType == NULL)
|
||||
if (ChangeType == nullptr)
|
||||
{
|
||||
c->Message(0,Usage);
|
||||
}
|
||||
@@ -6085,7 +6085,7 @@ void command_wpinfo(Client *c, const Seperator *sep)
|
||||
{
|
||||
Mob *t=c->GetTarget();
|
||||
|
||||
if (t == NULL || !t->IsNPC()) {
|
||||
if (t == nullptr || !t->IsNPC()) {
|
||||
c->Message(0,"You must target an NPC to use this.");
|
||||
return;
|
||||
}
|
||||
@@ -6106,7 +6106,7 @@ void command_wpadd(Client *c, const Seperator *sep)
|
||||
{
|
||||
Spawn2* s2info = t->CastToNPC()->respawn2;
|
||||
|
||||
if(s2info == NULL) // Can't figure out where this mob's spawn came from... maybe a dynamic mob created by #spawn
|
||||
if(s2info == nullptr) // Can't figure out where this mob's spawn came from... maybe a dynamic mob created by #spawn
|
||||
{
|
||||
c->Message(0,"#wpadd FAILED -- Can't determine which spawn record in the database this mob came from!");
|
||||
return;
|
||||
@@ -6197,7 +6197,7 @@ void command_giveitem(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (!sep->IsNumber(1)) {
|
||||
c->Message(13, "Usage: #summonitem [item id] [charges], charges are optional");
|
||||
} else if(c->GetTarget() == NULL) {
|
||||
} else if(c->GetTarget() == nullptr) {
|
||||
c->Message(13, "You must target a client to give the item to.");
|
||||
} else if(!c->GetTarget()->IsClient()) {
|
||||
c->Message(13, "You can only give items to players with this command.");
|
||||
@@ -6235,7 +6235,7 @@ void command_givemoney(Client *c, const Seperator *sep)
|
||||
if (!sep->IsNumber(1)) { //as long as the first one is a number, we'll just let atoi convert the rest to 0 or a number
|
||||
c->Message(13, "Usage: #Usage: #givemoney [pp] [gp] [sp] [cp]");
|
||||
}
|
||||
else if(c->GetTarget() == NULL) {
|
||||
else if(c->GetTarget() == nullptr) {
|
||||
c->Message(13, "You must target a player to give money to.");
|
||||
}
|
||||
else if(!c->GetTarget()->IsClient()) {
|
||||
@@ -6288,7 +6288,7 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
strn0cpy(sName, item->Name, sizeof(sName));
|
||||
strupr(sName);
|
||||
pdest = strstr(sName, sCriteria);
|
||||
if (pdest != NULL) {
|
||||
if (pdest != nullptr) {
|
||||
if (c->GetClientVersion() >= EQClientRoF)
|
||||
{
|
||||
c->Message(0, " %i: %c%06X0000000000000000000000000000000000000000000000000%s%c",(int) item->ID,0x12, item->ID, item->Name, 0x12);
|
||||
@@ -6526,7 +6526,7 @@ void command_ban(Client *c, const Seperator *sep)
|
||||
worldserver.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
|
||||
Client *client = NULL;
|
||||
Client *client = nullptr;
|
||||
client = entity_list.GetClientByName(sep->arg[1]);
|
||||
if(client)
|
||||
{
|
||||
@@ -6559,7 +6559,7 @@ void command_ban(Client *c, const Seperator *sep)
|
||||
void command_suspend(Client *c, const Seperator *sep)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = NULL;
|
||||
char *query = nullptr;
|
||||
|
||||
if((sep->arg[1][0] == 0) || (sep->arg[2][0] == 0))
|
||||
c->Message(0, "Usage: #suspend <charname> <days> (Specify 0 days to lift the suspension immediately)");
|
||||
@@ -6671,7 +6671,7 @@ void command_revoke(Client *c, const Seperator *sep)
|
||||
if(query)
|
||||
{
|
||||
safe_delete_array(query);
|
||||
query=NULL;
|
||||
query=nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7320,7 +7320,7 @@ void command_opcode(Client *c, const Seperator *sep) {
|
||||
|
||||
void command_logsql(Client *c, const Seperator *sep) {
|
||||
if(!strcasecmp( sep->arg[1], "off" )) {
|
||||
c->ChangeSQLLog(NULL);
|
||||
c->ChangeSQLLog(nullptr);
|
||||
} else if(sep->arg[1][0] != '\0') {
|
||||
c->ChangeSQLLog(sep->argplus[1]);
|
||||
} else {
|
||||
@@ -7468,7 +7468,7 @@ void command_fear(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
if(!strcasecmp(sep->arg[1], "view")) {
|
||||
if(zone->pathing == NULL) {
|
||||
if(zone->pathing == nullptr) {
|
||||
c->Message(13, "There is no fear grid file loaded for this zone.");
|
||||
return;
|
||||
}
|
||||
@@ -7479,13 +7479,13 @@ void command_fear(Client *c, const Seperator *sep) {
|
||||
PathNode_Struct *node = zone->pathing->GetNode(0); //assumes nodes are stored in a linear array
|
||||
for(r = 0; r < count; r++, node++) {
|
||||
sprintf(buf, "Fear_Point%d 3", r);
|
||||
NPC* npc = NPC::SpawnNPC(buf, node->x, node->y, node->z, c->GetHeading(), NULL);
|
||||
if(npc == NULL)
|
||||
NPC* npc = NPC::SpawnNPC(buf, node->x, node->y, node->z, c->GetHeading(), nullptr);
|
||||
if(npc == nullptr)
|
||||
c->Message(13, "Unable to spawn new NPC marker.");
|
||||
//do we need to do anything else?
|
||||
}
|
||||
} else if(!strcasecmp(sep->arg[1], "path")) {
|
||||
if(zone->pathing == NULL) {
|
||||
if(zone->pathing == nullptr) {
|
||||
c->Message(13, "There is no fear grid file loaded for this zone.");
|
||||
return;
|
||||
}
|
||||
@@ -7516,8 +7516,8 @@ void command_fear(Client *c, const Seperator *sep) {
|
||||
it.z = fs.z;
|
||||
pts.push_back(it);
|
||||
} else {
|
||||
NPC* npc = NPC::SpawnNPC(buf, fs.x, fs.y, fs.z, c->GetHeading(), NULL);
|
||||
if(npc == NULL)
|
||||
NPC* npc = NPC::SpawnNPC(buf, fs.x, fs.y, fs.z, c->GetHeading(), nullptr);
|
||||
if(npc == nullptr)
|
||||
c->Message(13, "Unable to spawn new NPC marker.");
|
||||
}
|
||||
|
||||
@@ -7534,7 +7534,7 @@ void command_fear(Client *c, const Seperator *sep) {
|
||||
it.z = fs.z;
|
||||
pts.push_back(it);
|
||||
} else {
|
||||
NPC::SpawnNPC(buf, fs.x, fs.y, fs.z, c->GetHeading(), NULL);
|
||||
NPC::SpawnNPC(buf, fs.x, fs.y, fs.z, c->GetHeading(), nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7543,7 +7543,7 @@ void command_fear(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
} else if(!strcasecmp(sep->arg[1], "close")) {
|
||||
if(zone->pathing == NULL) {
|
||||
if(zone->pathing == nullptr) {
|
||||
c->Message(13, "There is no fear grid file loaded for this zone.");
|
||||
return;
|
||||
}
|
||||
@@ -7554,8 +7554,8 @@ void command_fear(Client *c, const Seperator *sep) {
|
||||
return;
|
||||
}
|
||||
|
||||
NPC* npc = NPC::SpawnNPC("Close_Fear_Point 2", fs.x, fs.y, fs.z, c->GetHeading(), NULL);
|
||||
if(npc == NULL)
|
||||
NPC* npc = NPC::SpawnNPC("Close_Fear_Point 2", fs.x, fs.y, fs.z, c->GetHeading(), nullptr);
|
||||
if(npc == nullptr)
|
||||
c->Message(13, "Unable to spawn new NPC marker.");
|
||||
|
||||
} else if(!strcasecmp(sep->arg[1], "see")) {
|
||||
@@ -7564,7 +7564,7 @@ void command_fear(Client *c, const Seperator *sep) {
|
||||
|
||||
Mob* target = c->GetTarget();
|
||||
|
||||
if(target == NULL) {
|
||||
if(target == nullptr) {
|
||||
//empty length packet == not found.
|
||||
EQApplicationPacket outapp(OP_FindPersonReply, 0);
|
||||
c->QueuePacket(&outapp);
|
||||
@@ -7676,7 +7676,7 @@ void command_path(Client *c, const Seperator *sep)
|
||||
if(zone->zonemap)
|
||||
{
|
||||
VERTEX loc(px, py, pz);
|
||||
best_z = zone->zonemap->FindBestZ(MAP_ROOT_NODE, loc, NULL, NULL);
|
||||
best_z = zone->zonemap->FindBestZ(MAP_ROOT_NODE, loc, nullptr, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7703,7 +7703,7 @@ void command_path(Client *c, const Seperator *sep)
|
||||
if(zone->zonemap)
|
||||
{
|
||||
VERTEX loc(px, py, pz);
|
||||
best_z = zone->zonemap->FindBestZ(MAP_ROOT_NODE, loc, NULL, NULL);
|
||||
best_z = zone->zonemap->FindBestZ(MAP_ROOT_NODE, loc, nullptr, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7932,7 +7932,7 @@ void Client::Undye() {
|
||||
for (int cur_slot = 0; cur_slot < 9 ; cur_slot++ ){
|
||||
uint8 slot2=SlotConvert(cur_slot);
|
||||
ItemInst* inst = m_inv.GetItem(slot2);
|
||||
if(inst != NULL) {
|
||||
if(inst != nullptr) {
|
||||
inst->SetColor(inst->GetItem()->Color);
|
||||
database.SaveInventory(CharacterID(), inst, slot2);
|
||||
}
|
||||
@@ -7981,7 +7981,7 @@ void command_ginfo(Client *c, const Seperator *sep)
|
||||
|
||||
uint32 r;
|
||||
for(r = 0; r < MAX_GROUP_MEMBERS; r++) {
|
||||
if(g->members[r] == NULL) {
|
||||
if(g->members[r] == nullptr) {
|
||||
if(g->membername[r][0] == '\0')
|
||||
continue;
|
||||
c->Message(0, "...Zoned Member: %s, Roles: %s %s %s", g->membername[r],
|
||||
@@ -8006,7 +8006,7 @@ void command_hp(Client *c, const Seperator *sep)
|
||||
|
||||
void command_aggro(Client *c, const Seperator *sep)
|
||||
{
|
||||
if(c->GetTarget() == NULL || !c->GetTarget()->IsNPC()) {
|
||||
if(c->GetTarget() == nullptr || !c->GetTarget()->IsNPC()) {
|
||||
c->Message(0, "Error: you must have an NPC target.");
|
||||
return;
|
||||
}
|
||||
@@ -8040,7 +8040,7 @@ void command_pf(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
void command_bestz(Client *c, const Seperator *sep) {
|
||||
if (zone->zonemap == NULL) {
|
||||
if (zone->zonemap == nullptr) {
|
||||
c->Message(0,"Maps deactivated in this zone.");
|
||||
return;
|
||||
}
|
||||
@@ -8064,10 +8064,10 @@ void command_bestz(Client *c, const Seperator *sep) {
|
||||
VERTEX bme(me);
|
||||
bme.z -= 500;
|
||||
|
||||
float best_z = zone->zonemap->FindBestZ(pnode, me, &hit, NULL);
|
||||
float best_z = zone->zonemap->FindBestZ(pnode, me, &hit, nullptr);
|
||||
|
||||
float best_z2 = -999990;
|
||||
if(zone->zonemap->LineIntersectsNode(pnode, me, bme, &hit, NULL)) {
|
||||
if(zone->zonemap->LineIntersectsNode(pnode, me, bme, &hit, nullptr)) {
|
||||
best_z2 = hit.z;
|
||||
}
|
||||
|
||||
@@ -8080,7 +8080,7 @@ void command_bestz(Client *c, const Seperator *sep) {
|
||||
c->Message(0,"Found no Z.");
|
||||
}
|
||||
|
||||
if(zone->watermap == NULL) {
|
||||
if(zone->watermap == nullptr) {
|
||||
c->Message(0,"Water Region Map not loaded for this zone");
|
||||
} else {
|
||||
WaterRegionType RegionType;
|
||||
@@ -8124,7 +8124,7 @@ void command_flags(Client *c, const Seperator *sep) {
|
||||
|
||||
if(c->Admin() >= minStatusToSeeOthersZoneFlags) {
|
||||
Mob *tgt = c->GetTarget();
|
||||
if(tgt != NULL && tgt->IsClient())
|
||||
if(tgt != nullptr && tgt->IsClient())
|
||||
t = tgt->CastToClient();
|
||||
}
|
||||
|
||||
@@ -8231,7 +8231,7 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
Mob *t = c->GetTarget();
|
||||
if(t == NULL || !t->IsClient()) {
|
||||
if(t == nullptr || !t->IsClient()) {
|
||||
c->Message(13, "client target required");
|
||||
return;
|
||||
}
|
||||
@@ -8251,7 +8251,7 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
||||
}
|
||||
|
||||
Mob *t = c->GetTarget();
|
||||
if(t == NULL || !t->IsClient()) {
|
||||
if(t == nullptr || !t->IsClient()) {
|
||||
c->Message(13, "client target required");
|
||||
return;
|
||||
}
|
||||
@@ -8290,7 +8290,7 @@ void command_mlog(Client *c, const Seperator *sep) {
|
||||
else { c->Message(13, "Invalid argument. Expected on/off."); return; }
|
||||
|
||||
Mob *tgt = c->GetTarget();
|
||||
if(tgt == NULL) {
|
||||
if(tgt == nullptr) {
|
||||
c->Message(13, "You must have a target for this command.");
|
||||
return;
|
||||
}
|
||||
@@ -8470,7 +8470,7 @@ void command_guildlist(Client *c, const Seperator *sep)
|
||||
|
||||
void command_hatelist(Client *c, const Seperator *sep) {
|
||||
Mob *target = c->GetTarget();
|
||||
if(target == NULL) {
|
||||
if(target == nullptr) {
|
||||
c->Message(0, "Error: you must have a target.");
|
||||
return;
|
||||
}
|
||||
@@ -8621,7 +8621,7 @@ void command_rules(Client *c, const Seperator *sep) {
|
||||
c->Message(0, " %s", *cur);
|
||||
}
|
||||
} else if(sep->argnum == 2) {
|
||||
const char *catfilt = NULL;
|
||||
const char *catfilt = nullptr;
|
||||
if(std::string("all") != sep->arg[2])
|
||||
catfilt = sep->arg[2];
|
||||
std::vector<const char *> rule_list;
|
||||
@@ -8644,7 +8644,7 @@ void command_rules(Client *c, const Seperator *sep) {
|
||||
c->Message(13, "Invalid argument count, see help.");
|
||||
return;
|
||||
} else {
|
||||
const char *catfilt = NULL;
|
||||
const char *catfilt = nullptr;
|
||||
if(std::string("all") != sep->arg[2])
|
||||
catfilt = sep->arg[2];
|
||||
std::vector<const char *> rule_list;
|
||||
@@ -8777,11 +8777,11 @@ void command_altactivate(Client *c, const Seperator *sep){
|
||||
if(!strcasecmp(sep->arg[1], "list")){
|
||||
c->Message(10, "You have access to the following AA Abilities:");
|
||||
int x, val;
|
||||
SendAA_Struct* saa = NULL;
|
||||
SendAA_Struct* saa = nullptr;
|
||||
for(x = 0; x < aaHighestID; x++){
|
||||
if(AA_Actions[x][0].spell_id || AA_Actions[x][0].action){ //if there's an action or spell associated we assume it's a valid
|
||||
val = 0; //and assume if they don't have a value for the first rank then it isn't valid for any rank
|
||||
saa = NULL;
|
||||
saa = nullptr;
|
||||
val = c->GetAA(x);
|
||||
if(val){
|
||||
saa = zone->FindAA(x);
|
||||
@@ -8810,7 +8810,7 @@ void command_altactivate(Client *c, const Seperator *sep){
|
||||
}
|
||||
|
||||
void command_refundaa(Client *c, const Seperator *sep){
|
||||
Client* refundee = NULL;
|
||||
Client* refundee = nullptr;
|
||||
int curpt = 0;
|
||||
bool refunded = false;
|
||||
if(c){
|
||||
@@ -9355,7 +9355,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
const char * zn = NULL;
|
||||
const char * zn = nullptr;
|
||||
uint32 zone_id = 0;
|
||||
|
||||
if(sep->IsNumber(2))
|
||||
@@ -9478,7 +9478,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
uint32 charid = database.GetCharacterID(sep->arg[2]);
|
||||
if(charid <= 0)
|
||||
{
|
||||
if(c->GetTarget() == NULL || (c->GetTarget() && !c->GetTarget()->IsClient()))
|
||||
if(c->GetTarget() == nullptr || (c->GetTarget() && !c->GetTarget()->IsClient()))
|
||||
{
|
||||
c->Message(0, "Character not found.");
|
||||
return;
|
||||
@@ -9508,7 +9508,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
void command_setstartzone(Client *c, const Seperator *sep)
|
||||
{
|
||||
uint32 startzone = 0;
|
||||
Client* target = NULL;
|
||||
Client* target = nullptr;
|
||||
if(c->GetTarget() && c->GetTarget()->IsClient() && sep->arg[1][0] != 0)
|
||||
target = c->GetTarget()->CastToClient();
|
||||
else {
|
||||
@@ -9584,7 +9584,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
int iObjectsFound = 0;
|
||||
int len;
|
||||
|
||||
Object* o = NULL;
|
||||
Object* o = nullptr;
|
||||
Object_Struct od;
|
||||
Door door;
|
||||
Doors* doors;
|
||||
@@ -9814,7 +9814,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
// Already in database?
|
||||
if (database.RunQuery(query, len, errbuf, &result))
|
||||
{
|
||||
if ((row = mysql_fetch_row(result)) != NULL)
|
||||
if ((row = mysql_fetch_row(result)) != nullptr)
|
||||
{
|
||||
if (atoi(row[0]) > 0)
|
||||
{
|
||||
@@ -9863,7 +9863,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
iObjectsFound = 0;
|
||||
if (database.RunQuery(query, len, errbuf, &result))
|
||||
{
|
||||
if ((row = mysql_fetch_row(result)) != NULL)
|
||||
if ((row = mysql_fetch_row(result)) != nullptr)
|
||||
{
|
||||
iObjectsFound = atoi(row[0]); // Number of nearby objects from database
|
||||
}
|
||||
@@ -9947,7 +9947,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
od.zone_id = zone->GetZoneID();
|
||||
od.zone_instance = zone->GetInstanceVersion();
|
||||
|
||||
o = new Object(id, od.object_type, icon, od, NULL);
|
||||
o = new Object(id, od.object_type, icon, od, nullptr);
|
||||
|
||||
// Add to our zone entity list and spawn immediately for all clients
|
||||
entity_list.AddObject(o, true);
|
||||
@@ -10364,7 +10364,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
}
|
||||
else
|
||||
{
|
||||
o->GetLocation(NULL, &od.y, NULL);
|
||||
o->GetLocation(nullptr, &od.y, nullptr);
|
||||
}
|
||||
|
||||
if (sep->argnum > 4)
|
||||
@@ -10373,7 +10373,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
}
|
||||
else
|
||||
{
|
||||
o->GetLocation(NULL, NULL, &od.z);
|
||||
o->GetLocation(nullptr, nullptr, &od.z);
|
||||
}
|
||||
|
||||
if (sep->argnum > 5)
|
||||
@@ -10404,7 +10404,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((o = entity_list.FindObject(id)) == NULL)
|
||||
if ((o = entity_list.FindObject(id)) == nullptr)
|
||||
{
|
||||
c->Message(0, "ERROR: Object %u not found in zone, or is a static object not yet unlocked with '#object Edit' for editing.", id);
|
||||
|
||||
@@ -10820,7 +10820,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
|
||||
app = new EQApplicationPacket();
|
||||
o->CreateDeSpawnPacket(app);
|
||||
entity_list.QueueClients(NULL, app);
|
||||
entity_list.QueueClients(nullptr, app);
|
||||
|
||||
entity_list.RemoveObject(o->GetID());
|
||||
|
||||
@@ -10945,7 +10945,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
od.object_type = TempStaticType;
|
||||
}
|
||||
|
||||
o = new Object(id, od.object_type, icon, od, NULL);
|
||||
o = new Object(id, od.object_type, icon, od, nullptr);
|
||||
entity_list.AddObject(o, true);
|
||||
|
||||
c->Message(0, "Object %u reloaded from database.", id);
|
||||
@@ -11097,7 +11097,7 @@ void command_emotesearch(Client *c, const Seperator *sep)
|
||||
strn0cpy(sText, nes->text, sizeof(sText));
|
||||
strupr(sText);
|
||||
pdest = strstr(sText, sCriteria);
|
||||
if (pdest != NULL)
|
||||
if (pdest != nullptr)
|
||||
{
|
||||
c->Message(0, "EmoteID: %i Event: %i Type: %i Text: %s", nes->emoteid, nes->event_, nes->type, nes->text);
|
||||
count++;
|
||||
@@ -11124,14 +11124,14 @@ void command_reloademote(Client *c, const Seperator *sep)
|
||||
|
||||
void command_globalview(Client *c, const Seperator *sep)
|
||||
{
|
||||
NPC * npcmob = NULL;
|
||||
NPC * npcmob = nullptr;
|
||||
|
||||
if(c->GetTarget() && c->GetTarget()->IsNPC())
|
||||
{
|
||||
npcmob = c->GetTarget()->CastToNPC();
|
||||
QGlobalCache *npc_c = NULL;
|
||||
QGlobalCache *char_c = NULL;
|
||||
QGlobalCache *zone_c = NULL;
|
||||
QGlobalCache *npc_c = nullptr;
|
||||
QGlobalCache *char_c = nullptr;
|
||||
QGlobalCache *zone_c = nullptr;
|
||||
|
||||
if(npcmob)
|
||||
npc_c = npcmob->GetQGlobals();
|
||||
@@ -11174,8 +11174,8 @@ void command_globalview(Client *c, const Seperator *sep)
|
||||
}
|
||||
else
|
||||
{
|
||||
QGlobalCache *char_c = NULL;
|
||||
QGlobalCache *zone_c = NULL;
|
||||
QGlobalCache *char_c = nullptr;
|
||||
QGlobalCache *zone_c = nullptr;
|
||||
|
||||
char_c = c->GetQGlobals();
|
||||
zone_c = zone->GetQGlobals();
|
||||
@@ -11485,7 +11485,7 @@ void command_mysql(Client *c, const Seperator *sep)
|
||||
LineVec.push_back(LineText.str());
|
||||
LineText.str("");
|
||||
}
|
||||
LineText << fields[i].name << ":" << "[" << (row[i] ? row[i] : "NULL") << "] ";
|
||||
LineText << fields[i].name << ":" << "[" << (row[i] ? row[i] : "nullptr") << "] ";
|
||||
}
|
||||
LineVec.push_back(LineText.str());
|
||||
|
||||
@@ -11627,7 +11627,7 @@ void command_augmentitem(Client *c, const Seperator *sep)
|
||||
in_augment->unknown02[0] = 0;
|
||||
in_augment->unknown02[1] = 0;
|
||||
in_augment->augment_slot = -1;
|
||||
if(c->GetTradeskillObject() != NULL)
|
||||
if(c->GetTradeskillObject() != nullptr)
|
||||
Object::HandleAugmentation(c, in_augment, c->GetTradeskillObject());
|
||||
safe_delete_array(in_augment);
|
||||
}
|
||||
|
||||
+6
-6
@@ -291,14 +291,14 @@ void Doors::HandleClick(Client* sender, uint8 trigger)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lockpicks != NULL)
|
||||
else if(lockpicks != nullptr)
|
||||
{
|
||||
if(sender->GetSkill(PICK_LOCK))
|
||||
{
|
||||
if(lockpicks->GetItem()->ItemType == ItemTypeLockPick)
|
||||
{
|
||||
float modskill=sender->GetSkill(PICK_LOCK);
|
||||
sender->CheckIncreaseSkill(PICK_LOCK, NULL, 1);
|
||||
sender->CheckIncreaseSkill(PICK_LOCK, nullptr, 1);
|
||||
|
||||
#if EQDEBUG>=5
|
||||
LogFile->write(EQEMuLog::Debug, "Client has lockpicks: skill=%f", modskill);
|
||||
@@ -580,7 +580,7 @@ int32 ZoneDatabase::GetDoorsCount(uint32* oMaxID, const char *zone_name, int16 v
|
||||
if (RunQuery(query, strlen(query), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
row = mysql_fetch_row(result);
|
||||
if (row != NULL && row[1] != 0) {
|
||||
if (row != nullptr && row[1] != 0) {
|
||||
int32 ret = atoi(row[1]);
|
||||
if (oMaxID) {
|
||||
if (row[0])
|
||||
@@ -614,7 +614,7 @@ int32 ZoneDatabase::GetDoorsCountPlusOne(const char *zone_name, int16 version) {
|
||||
if (RunQuery(query, strlen(query), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
row = mysql_fetch_row(result);
|
||||
if (row != NULL && row[1] != 0) {
|
||||
if (row != nullptr && row[1] != 0) {
|
||||
if (row[0])
|
||||
oMaxID = atoi(row[0]) + 1;
|
||||
else
|
||||
@@ -645,7 +645,7 @@ int32 ZoneDatabase::GetDoorsDBCountPlusOne(const char *zone_name, int16 version)
|
||||
if (RunQuery(query, strlen(query), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
row = mysql_fetch_row(result);
|
||||
if (row != NULL && row[1] != 0) {
|
||||
if (row != nullptr && row[1] != 0) {
|
||||
if (row[0])
|
||||
oMaxID = atoi(row[0]) + 1;
|
||||
else
|
||||
@@ -711,7 +711,7 @@ bool ZoneDatabase::LoadDoors(int32 iDoorCount, Door *into, const char *zone_name
|
||||
into[r].incline=atoi(row[23]);
|
||||
into[r].size=atoi(row[24]);
|
||||
into[r].is_ldon_door=atoi(row[25]);
|
||||
into[r].client_version_mask = (uint32)strtoul(row[26], NULL, 10);
|
||||
into[r].client_version_mask = (uint32)strtoul(row[26], nullptr, 10);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
|
||||
+1
-1
@@ -445,7 +445,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
|
||||
|
||||
//get the item info
|
||||
const Item_Struct *item = database.GetItem(itemid);
|
||||
if(item == NULL) {
|
||||
if(item == nullptr) {
|
||||
Message(13, "Unable to find the tome you turned in!");
|
||||
LogFile->write(EQEMuLog::Error, "Unable to find turned in tome id %lu\n", (unsigned long)itemid);
|
||||
return(false);
|
||||
|
||||
+32
-32
@@ -103,7 +103,7 @@ extern Zone* zone;
|
||||
|
||||
PerlembParser::PerlembParser(void) : Parser()
|
||||
{
|
||||
perl = NULL;
|
||||
perl = nullptr;
|
||||
eventQueueProcessing = false;
|
||||
globalPlayerQuestLoaded = pQuestReadyToLoad;
|
||||
globalNPCQuestLoaded = nQuestReadyToLoad;
|
||||
@@ -232,7 +232,7 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
EventRecord e;
|
||||
e.event = event;
|
||||
e.objid = objid;
|
||||
if(data != NULL)
|
||||
if(data != nullptr)
|
||||
e.data = data;
|
||||
e.npcmob = npcmob;
|
||||
e.iteminst = iteminst;
|
||||
@@ -371,9 +371,9 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
if(npcmob && npcmob->GetQglobal())
|
||||
{
|
||||
map<string, string> globhash;
|
||||
QGlobalCache *npc_c = NULL;
|
||||
QGlobalCache *char_c = NULL;
|
||||
QGlobalCache *zone_c = NULL;
|
||||
QGlobalCache *npc_c = nullptr;
|
||||
QGlobalCache *char_c = nullptr;
|
||||
QGlobalCache *zone_c = nullptr;
|
||||
|
||||
//retrieve our globals
|
||||
npc_c = npcmob->GetQGlobals();
|
||||
@@ -432,8 +432,8 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
else
|
||||
{
|
||||
map<string, string> globhash;
|
||||
QGlobalCache *char_c = NULL;
|
||||
QGlobalCache *zone_c = NULL;
|
||||
QGlobalCache *char_c = nullptr;
|
||||
QGlobalCache *zone_c = nullptr;
|
||||
|
||||
//retrieve our globals
|
||||
if(mob && mob->IsClient())
|
||||
@@ -563,7 +563,7 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
|
||||
for(int slot=HASITEM_FIRST; slot<=HASITEM_LAST;slot++)
|
||||
{
|
||||
char *hi_decl=NULL;
|
||||
char *hi_decl=nullptr;
|
||||
int itemid=mob->CastToClient()->GetItemIDAt(slot);
|
||||
if(!HASITEM_ISNULLITEM(itemid))
|
||||
{
|
||||
@@ -581,7 +581,7 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
if(mob && mob->IsClient()) {
|
||||
string hashname = packagename + std::string("::oncursor");
|
||||
perl->eval(std::string("%").append(hashname).append(" = ();").c_str());
|
||||
char *hi_decl = NULL;
|
||||
char *hi_decl = nullptr;
|
||||
int itemid = mob->CastToClient()->GetItemIDAt(30);
|
||||
if(!HASITEM_ISNULLITEM(itemid)) {
|
||||
MakeAnyLenString(&hi_decl, "push (@{$%s{%d}},%d);",hashname.c_str(),itemid,30);
|
||||
@@ -835,7 +835,7 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
}
|
||||
|
||||
if(isPlayerQuest || isGlobalPlayerQuest){
|
||||
SendCommands(packagename.c_str(), sub_name, 0, mob, mob, NULL);
|
||||
SendCommands(packagename.c_str(), sub_name, 0, mob, mob, nullptr);
|
||||
}
|
||||
else if(isItemQuest) {
|
||||
SendCommands(packagename.c_str(), sub_name, 0, mob, mob, iteminst);
|
||||
@@ -843,13 +843,13 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
else if(isSpellQuest)
|
||||
{
|
||||
if(mob) {
|
||||
SendCommands(packagename.c_str(), sub_name, 0, mob, mob, NULL);
|
||||
SendCommands(packagename.c_str(), sub_name, 0, mob, mob, nullptr);
|
||||
} else {
|
||||
SendCommands(packagename.c_str(), sub_name, 0, npcmob, mob, NULL);
|
||||
SendCommands(packagename.c_str(), sub_name, 0, npcmob, mob, nullptr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SendCommands(packagename.c_str(), sub_name, objid, npcmob, mob, NULL);
|
||||
SendCommands(packagename.c_str(), sub_name, objid, npcmob, mob, nullptr);
|
||||
}
|
||||
|
||||
//now handle any events that cropped up...
|
||||
@@ -857,27 +857,27 @@ void PerlembParser::EventCommon(QuestEventID event, uint32 objid, const char * d
|
||||
}
|
||||
|
||||
void PerlembParser::EventGlobalNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data) {
|
||||
EventCommon(evt, npc->GetNPCTypeID(), data.c_str(), npc, NULL, init, extra_data, true);
|
||||
EventCommon(evt, npc->GetNPCTypeID(), data.c_str(), npc, nullptr, init, extra_data, true);
|
||||
}
|
||||
|
||||
void PerlembParser::EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data) {
|
||||
EventCommon(evt, npc->GetNPCTypeID(), data.c_str(), npc, NULL, init, extra_data);
|
||||
EventCommon(evt, npc->GetNPCTypeID(), data.c_str(), npc, nullptr, init, extra_data);
|
||||
}
|
||||
|
||||
void PerlembParser::EventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data) {
|
||||
EventCommon(evt, 0, data.c_str(), NULL, NULL, client, extra_data);
|
||||
EventCommon(evt, 0, data.c_str(), nullptr, nullptr, client, extra_data);
|
||||
}
|
||||
|
||||
void PerlembParser::EventGlobalPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data) {
|
||||
EventCommon(evt, 0, data.c_str(), NULL, NULL, client, extra_data, true);
|
||||
EventCommon(evt, 0, data.c_str(), nullptr, nullptr, client, extra_data, true);
|
||||
}
|
||||
|
||||
void PerlembParser::EventItem(QuestEventID evt, Client *client, ItemInst *item, uint32 objid, uint32 extra_data) {
|
||||
EventCommon(evt, objid, NULL, NULL, item, client, extra_data);
|
||||
EventCommon(evt, objid, nullptr, nullptr, item, client, extra_data);
|
||||
}
|
||||
|
||||
void PerlembParser::EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, uint32 extra_data) {
|
||||
EventCommon(evt, 0, itoa(spell_id), npc, NULL, client, extra_data);
|
||||
EventCommon(evt, 0, itoa(spell_id), npc, nullptr, client, extra_data);
|
||||
}
|
||||
|
||||
void PerlembParser::ReloadQuests(bool with_timers) {
|
||||
@@ -891,22 +891,22 @@ void PerlembParser::ReloadQuests(bool with_timers) {
|
||||
command_clear_perl();
|
||||
|
||||
try {
|
||||
if(perl == NULL)
|
||||
if(perl == nullptr)
|
||||
perl = new Embperl;
|
||||
else
|
||||
perl->Reinit();
|
||||
map_funs();
|
||||
}
|
||||
catch(std::exception &e) {
|
||||
if(perl != NULL) {
|
||||
if(perl != nullptr) {
|
||||
delete perl;
|
||||
perl = NULL;
|
||||
perl = nullptr;
|
||||
}
|
||||
LogFile->write(EQEMuLog::Status, "Error re-initializing perlembed: %s", e.what());
|
||||
throw e.what();
|
||||
}
|
||||
try {
|
||||
LoadScript(0, NULL);
|
||||
LoadScript(0, nullptr);
|
||||
}
|
||||
catch(const char * err) {
|
||||
LogFile->write(EQEMuLog::Status, "Error loading default script: %s", err);
|
||||
@@ -962,7 +962,7 @@ int PerlembParser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
int count0 = 0;
|
||||
bool filefound = false;
|
||||
tmpf = fopen(filename.c_str(), "r");
|
||||
if(tmpf != NULL)
|
||||
if(tmpf != nullptr)
|
||||
{
|
||||
fclose(tmpf);
|
||||
filefound = true;
|
||||
@@ -976,7 +976,7 @@ int PerlembParser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
//revert to just path
|
||||
filename = bnfilename;
|
||||
const NPCType *npct = database.GetNPCType(npcid);
|
||||
if(npct == NULL)
|
||||
if(npct == nullptr)
|
||||
{
|
||||
//LogFile->write(EQEMuLog::Debug, " no npc type");
|
||||
//revert and go on with life
|
||||
@@ -992,7 +992,7 @@ int PerlembParser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
if(nlen < 64)
|
||||
{
|
||||
int r;
|
||||
//this should get our NULL as well..
|
||||
//this should get our nullptr as well..
|
||||
for(r = 0; r <= nlen; r++)
|
||||
{
|
||||
tmpname[r] = npct->name[r];
|
||||
@@ -1039,7 +1039,7 @@ int PerlembParser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
#ifdef QUEST_TEMPLATES_BYNAME
|
||||
|
||||
tmpf = fopen(filename.c_str(), "r");
|
||||
if(tmpf != NULL)
|
||||
if(tmpf != nullptr)
|
||||
{
|
||||
fclose(tmpf);
|
||||
filefound = true;
|
||||
@@ -1081,7 +1081,7 @@ int PerlembParser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
#endif //QUEST_SCRIPTS_BYNAME
|
||||
|
||||
tmpf = fopen(filename.c_str(), "r");
|
||||
if(tmpf != NULL)
|
||||
if(tmpf != nullptr)
|
||||
{
|
||||
fclose(tmpf);
|
||||
filefound = true;
|
||||
@@ -1098,7 +1098,7 @@ int PerlembParser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
}
|
||||
|
||||
tmpf = fopen(filename.c_str(), "r");
|
||||
if(tmpf != NULL)
|
||||
if(tmpf != nullptr)
|
||||
{
|
||||
fclose(tmpf);
|
||||
filefound = true;
|
||||
@@ -1120,7 +1120,7 @@ int PerlembParser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
|
||||
//check for existance of quest file before trying to make perl load it.
|
||||
tmpf = fopen(filename.c_str(), "r");
|
||||
if(tmpf == NULL)
|
||||
if(tmpf == nullptr)
|
||||
{
|
||||
//the npc has no qst file, attach the defaults
|
||||
std::string setdefcmd = "$";
|
||||
@@ -1551,7 +1551,7 @@ void PerlembParser::SendCommands(const char * pkgprefix, const char *event, uint
|
||||
if(mob && mob->IsClient())
|
||||
quest_manager.StartQuest(other, mob->CastToClient());
|
||||
else
|
||||
quest_manager.StartQuest(other, NULL);
|
||||
quest_manager.StartQuest(other, nullptr);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1588,7 +1588,7 @@ void PerlembParser::SendCommands(const char * pkgprefix, const char *event, uint
|
||||
void PerlembParser::ExecCommand(Client *c, Seperator *sep) {
|
||||
#ifdef EMBPERL_XS_CLASSES
|
||||
SV *client = get_sv("commands::client", true);
|
||||
if(c != NULL) {
|
||||
if(c != nullptr) {
|
||||
sv_setref_pv(client, "Client", c);
|
||||
} else {
|
||||
//clear out the value, mainly to get rid of blessedness
|
||||
|
||||
+2
-2
@@ -114,7 +114,7 @@ void Embperl::DoInit() {
|
||||
#ifdef EMBPERL_IO_CAPTURE
|
||||
"-w", "-W",
|
||||
#endif
|
||||
"-e", "0;", NULL };
|
||||
"-e", "0;", nullptr };
|
||||
|
||||
int argc = 3;
|
||||
#ifdef EMBPERL_IO_CAPTURE
|
||||
@@ -122,7 +122,7 @@ void Embperl::DoInit() {
|
||||
#endif
|
||||
|
||||
char **argv = (char **)argv_eqemu;
|
||||
char **env = { NULL };
|
||||
char **env = { nullptr };
|
||||
|
||||
PL_perl_destruct_level = 1;
|
||||
|
||||
|
||||
+2
-2
@@ -91,7 +91,7 @@ public:
|
||||
//evaluate an expression. throws string errors on fail
|
||||
void eval(const char * code);
|
||||
//execute a subroutine. throws lasterr on failure
|
||||
void dosub(const char * subname, const std::vector<std::string> * args = NULL, int mode = G_SCALAR|G_DISCARD|G_EVAL);
|
||||
void dosub(const char * subname, const std::vector<std::string> * args = nullptr, int mode = G_SCALAR|G_DISCARD|G_EVAL);
|
||||
|
||||
//Access to perl variables
|
||||
//all varnames here should be of the form package::name
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
SV *val = newSVpv(it->second.c_str(), it->second.length());
|
||||
|
||||
// If val was not added to hash, reset reference count
|
||||
if (hv_store(hv, it->first.c_str(), keylen, val, 0) == NULL)
|
||||
if (hv_store(hv, it->first.c_str(), keylen, val, 0) == nullptr)
|
||||
val->sv_refcnt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -28,13 +28,13 @@
|
||||
|
||||
const char *getItemName(unsigned itemid)
|
||||
{
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
item = database.GetItem(itemid);
|
||||
|
||||
if (item)
|
||||
return item->Name;
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
XS(XS_qc_getItemName); /* prototype to pass -Wmissing-prototypes */
|
||||
|
||||
+34
-34
@@ -83,7 +83,7 @@ void Entity::SetID(uint16 set_id) {
|
||||
|
||||
Client* Entity::CastToClient() {
|
||||
if(this==0x00){
|
||||
cout << "CastToClient error (NULL)" << endl;
|
||||
cout << "CastToClient error (nullptr)" << endl;
|
||||
DebugBreak();
|
||||
return 0;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ Beacon* Entity::CastToBeacon() {
|
||||
|
||||
const Client* Entity::CastToClient() const {
|
||||
if(this==0x00){
|
||||
cout << "CastToClient error (NULL)" << endl;
|
||||
cout << "CastToClient error (nullptr)" << endl;
|
||||
DebugBreak();
|
||||
return 0;
|
||||
}
|
||||
@@ -350,7 +350,7 @@ void EntityList::TrapProcess() {
|
||||
}
|
||||
|
||||
|
||||
// Debug function -- checks to see if group_list has any NULL entries.
|
||||
// Debug function -- checks to see if group_list has any nullptr entries.
|
||||
// Meant to be called after each group-related function, in order
|
||||
// to track down bugs.
|
||||
void EntityList::CheckGroupList (const char *fname, const int fline)
|
||||
@@ -359,9 +359,9 @@ void EntityList::CheckGroupList (const char *fname, const int fline)
|
||||
|
||||
for (it = group_list.begin(); it != group_list.end(); it++)
|
||||
{
|
||||
if (*it == NULL)
|
||||
if (*it == nullptr)
|
||||
{
|
||||
LogFile->write(EQEMuLog::Error, "NULL group, %s:%i", fname, fline);
|
||||
LogFile->write(EQEMuLog::Error, "nullptr group, %s:%i", fname, fline);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -556,7 +556,7 @@ void EntityList::BeaconProcess() {
|
||||
|
||||
|
||||
void EntityList::AddGroup(Group* group) {
|
||||
if(group == NULL) //this seems to be happening somehow...
|
||||
if(group == nullptr) //this seems to be happening somehow...
|
||||
return;
|
||||
|
||||
uint32 gid = worldserver.NextGroupID();
|
||||
@@ -584,7 +584,7 @@ void EntityList::AddGroup(Group* group, uint32 gid) {
|
||||
}
|
||||
|
||||
void EntityList::AddRaid(Raid* raid) {
|
||||
if(raid == NULL)
|
||||
if(raid == nullptr)
|
||||
return;
|
||||
|
||||
uint32 gid = worldserver.NextGroupID();
|
||||
@@ -619,7 +619,7 @@ void EntityList::AddCorpse(Corpse* corpse, uint32 in_id) {
|
||||
|
||||
void EntityList::AddNPC(NPC* npc, bool SendSpawnPacket, bool dontqueue) {
|
||||
npc->SetID(GetFreeID());
|
||||
parse->EventNPC(EVENT_SPAWN, npc, NULL, "", 0);
|
||||
parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0);
|
||||
|
||||
uint16 emoteid = npc->GetEmoteID();
|
||||
if(emoteid != 0)
|
||||
@@ -671,7 +671,7 @@ void EntityList::AddMerc(Merc* merc, bool SendSpawnPacket, bool dontqueue) {
|
||||
safe_delete(ns);
|
||||
}
|
||||
|
||||
//parse->EventMERC(EVENT_SPAWN, merc, NULL, "", 0);
|
||||
//parse->EventMERC(EVENT_SPAWN, merc, nullptr, "", 0);
|
||||
}
|
||||
|
||||
merc_list.Insert(merc);
|
||||
@@ -800,7 +800,7 @@ Object* EntityList::FindObject(uint32 object_id)
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Object* EntityList::FindNearbyObject(float x, float y, float z, float radius)
|
||||
@@ -830,7 +830,7 @@ Object* EntityList::FindNearbyObject(float x, float y, float z, float radius)
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -1604,7 +1604,7 @@ void EntityList::QueueClientsByTarget(Mob* sender, const EQApplicationPacket* ap
|
||||
if(!Target)
|
||||
continue;
|
||||
|
||||
Mob *TargetsTarget = NULL;
|
||||
Mob *TargetsTarget = nullptr;
|
||||
|
||||
if(Target)
|
||||
TargetsTarget = Target->GetTarget();
|
||||
@@ -1659,7 +1659,7 @@ void EntityList::QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* a
|
||||
}
|
||||
|
||||
void EntityList::QueueCloseClients(Mob* sender, const EQApplicationPacket* app, bool ignore_sender, float dist, Mob* SkipThisMob, bool ackreq, eqFilterType filter) {
|
||||
if (sender == NULL) {
|
||||
if (sender == nullptr) {
|
||||
QueueClients(sender, app, ignore_sender);
|
||||
return;
|
||||
}
|
||||
@@ -1968,7 +1968,7 @@ Client* EntityList::GetRandomClient(float x, float y, float z, float Distance, C
|
||||
}
|
||||
|
||||
if(ClientsInRange.size() == 0)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return ClientsInRange[MakeRandomInt(0, ClientsInRange.size() - 1)];
|
||||
}
|
||||
@@ -3552,7 +3552,7 @@ void EntityList::AddHealAggro(Mob* target, Mob* caster, uint16 thedam)
|
||||
LinkedListIterator<NPC*> iterator(npc_list);
|
||||
|
||||
iterator.Reset();
|
||||
NPC *cur = NULL;
|
||||
NPC *cur = nullptr;
|
||||
uint16 count = 0;
|
||||
while(iterator.MoreElements())
|
||||
{
|
||||
@@ -3579,7 +3579,7 @@ void EntityList::AddHealAggro(Mob* target, Mob* caster, uint16 thedam)
|
||||
thedam = 1;
|
||||
}
|
||||
|
||||
cur = NULL;
|
||||
cur = nullptr;
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements())
|
||||
{
|
||||
@@ -3723,7 +3723,7 @@ void EntityList::ProcessMove(Client *c, float x, float y, float z) {
|
||||
for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) {
|
||||
NPC *d = iterator.GetData();
|
||||
NPCProximity *l = d->proximity;
|
||||
if(l == NULL)
|
||||
if(l == nullptr)
|
||||
continue;
|
||||
|
||||
//This is done to address the issue of this code not being reentrant
|
||||
@@ -3792,7 +3792,7 @@ void EntityList::ProcessProximitySay(const char *Message, Client *c, uint8 langu
|
||||
for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) {
|
||||
NPC *d = iterator.GetData();
|
||||
NPCProximity *l = d->proximity;
|
||||
if(l == NULL || !l->say)
|
||||
if(l == nullptr || !l->say)
|
||||
continue;
|
||||
|
||||
if( c->GetX() < l->min_x || c->GetX() > l->max_x
|
||||
@@ -4039,7 +4039,7 @@ void EntityList::DestroyTempPets(Mob *owner)
|
||||
|
||||
bool Entity::CheckCoordLosNoZLeaps(float cur_x, float cur_y, float cur_z, float trg_x, float trg_y, float trg_z, float perwalk)
|
||||
{
|
||||
if(zone->zonemap == NULL) {
|
||||
if(zone->zonemap == nullptr) {
|
||||
return(true);
|
||||
}
|
||||
VERTEX myloc;
|
||||
@@ -4090,11 +4090,11 @@ void EntityList::QuestJournalledSayClose(Mob *sender, Client *QuestInitiator, fl
|
||||
Corpse* EntityList::GetClosestCorpse(Mob* sender, const char* Name)
|
||||
{
|
||||
if(!sender)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
uint32 CurrentDistance, ClosestDistance = 4294967295u;
|
||||
|
||||
Corpse *CurrentCorpse, *ClosestCorpse = NULL;
|
||||
Corpse *CurrentCorpse, *ClosestCorpse = nullptr;
|
||||
|
||||
LinkedListIterator<Corpse*> iterator(corpse_list);
|
||||
|
||||
@@ -4129,7 +4129,7 @@ void EntityList::ForceGroupUpdate(uint32 gid) {
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if(iterator.GetData()){
|
||||
Group *g = NULL;
|
||||
Group *g = nullptr;
|
||||
g = iterator.GetData()->GetGroup();
|
||||
if(g){
|
||||
if(g->GetID() == gid)
|
||||
@@ -4148,7 +4148,7 @@ void EntityList::SendGroupLeave(uint32 gid, const char *name) {
|
||||
while(iterator.MoreElements()) {
|
||||
Client *c = iterator.GetData();
|
||||
if(c){
|
||||
Group *g = NULL;
|
||||
Group *g = nullptr;
|
||||
g = c->GetGroup();
|
||||
if(g){
|
||||
if(g->GetID() == gid)
|
||||
@@ -4178,7 +4178,7 @@ void EntityList::SendGroupJoin(uint32 gid, const char *name) {
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if(iterator.GetData()){
|
||||
Group *g = NULL;
|
||||
Group *g = nullptr;
|
||||
g = iterator.GetData()->GetGroup();
|
||||
if(g){
|
||||
if(g->GetID() == gid)
|
||||
@@ -4207,7 +4207,7 @@ void EntityList::GroupMessage(uint32 gid, const char *from, const char *message)
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if(iterator.GetData()){
|
||||
Group *g = NULL;
|
||||
Group *g = nullptr;
|
||||
g = iterator.GetData()->GetGroup();
|
||||
if(g){
|
||||
if(g->GetID() == gid)
|
||||
@@ -4273,7 +4273,7 @@ uint16 EntityList::CreateDoor(const char *model, float x, float y, float z, floa
|
||||
Mob* EntityList::GetTargetForMez(Mob* caster)
|
||||
{
|
||||
if(!caster)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
LinkedListIterator<Mob*> iterator(mob_list);
|
||||
iterator.Reset();
|
||||
@@ -4309,7 +4309,7 @@ Mob* EntityList::GetTargetForMez(Mob* caster)
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void EntityList::SendZoneAppearance(Client *c)
|
||||
@@ -4655,7 +4655,7 @@ void EntityList::UnMarkNPC(uint16 ID)
|
||||
{
|
||||
if(iterator.GetData())
|
||||
{
|
||||
Group *g = NULL;
|
||||
Group *g = nullptr;
|
||||
|
||||
g = iterator.GetData()->GetGroup();
|
||||
|
||||
@@ -4988,7 +4988,7 @@ void EntityList::HideCorpses(Client *c, uint8 CurrentMode, uint8 NewMode)
|
||||
return;
|
||||
}
|
||||
|
||||
Group *g = NULL;
|
||||
Group *g = nullptr;
|
||||
|
||||
if(NewMode == HideCorpseAllButGroup)
|
||||
{
|
||||
@@ -5130,10 +5130,10 @@ void EntityList::CameraEffect(uint32 duration, uint32 intensity) {
|
||||
NPC* EntityList::GetClosestBanker(Mob* sender, uint32 &distance)
|
||||
{
|
||||
if(!sender)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
distance = 4294967295u;
|
||||
NPC* nc = NULL;
|
||||
NPC* nc = nullptr;
|
||||
|
||||
LinkedListIterator<NPC*> iterator(npc_list);
|
||||
iterator.Reset();
|
||||
@@ -5174,11 +5174,11 @@ Mob* EntityList::GetClosestMobByBodyType(Mob* sender, bodyType BodyType)
|
||||
{
|
||||
|
||||
if(!sender)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
uint32 CurrentDistance, ClosestDistance = 4294967295u;
|
||||
|
||||
Mob *CurrentMob, *ClosestMob = NULL;
|
||||
Mob *CurrentMob, *ClosestMob = nullptr;
|
||||
|
||||
LinkedListIterator<Mob*> iterator(mob_list);
|
||||
|
||||
@@ -5302,7 +5302,7 @@ Mob* EntityList::GetTargetForVirus(Mob* spreader)
|
||||
}
|
||||
|
||||
if(TargetsInRange.size() == 0)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return TargetsInRange[MakeRandomInt(0, TargetsInRange.size() - 1)];
|
||||
}
|
||||
|
||||
+2
-2
@@ -145,7 +145,7 @@ public:
|
||||
Client* GetClientByCharID(uint32 iCharID);
|
||||
Client* GetClientByWID(uint32 iWID);
|
||||
Client* GetClient(uint32 ip, uint16 port);
|
||||
Client* GetRandomClient(float x, float y, float z, float Distance, Client *ExcludeClient = NULL);
|
||||
Client* GetRandomClient(float x, float y, float z, float Distance, Client *ExcludeClient = nullptr);
|
||||
Group* GetGroupByMob(Mob* mob);
|
||||
Group* GetGroupByClient(Client* client);
|
||||
Group* GetGroupByID(uint32 id);
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
void RefreshAllGuildInfo(uint32 guild_id);
|
||||
void SendGuildList();
|
||||
// void SendGuildJoin(GuildJoin_Struct* gj);
|
||||
// Check group list for NULL entries
|
||||
// Check group list for nullptr entries
|
||||
void CheckGroupList (const char *fname, const int fline);
|
||||
void GroupProcess();
|
||||
void RaidProcess();
|
||||
|
||||
+5
-5
@@ -518,7 +518,7 @@ void Group::SplitExp(uint32 exp, Mob* other) {
|
||||
uint8 maxlevel = 1;
|
||||
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] != NULL) {
|
||||
if (members[i] != nullptr) {
|
||||
if(members[i]->GetLevel() > maxlevel)
|
||||
maxlevel = members[i]->GetLevel();
|
||||
|
||||
@@ -550,7 +550,7 @@ void Group::SplitExp(uint32 exp, Mob* other) {
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] != NULL && members[i]->IsClient()) // If Group Member is Client
|
||||
if (members[i] != nullptr && members[i]->IsClient()) // If Group Member is Client
|
||||
{
|
||||
Client *cmember = members[i]->CastToClient();
|
||||
// add exp + exp cap
|
||||
@@ -579,7 +579,7 @@ void Raid::SplitExp(uint32 exp, Mob* other) {
|
||||
uint8 maxlevel = 1;
|
||||
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if (members[i].member != NULL) {
|
||||
if (members[i].member != nullptr) {
|
||||
if(members[i].member->GetLevel() > maxlevel)
|
||||
maxlevel = members[i].member->GetLevel();
|
||||
|
||||
@@ -597,7 +597,7 @@ void Raid::SplitExp(uint32 exp, Mob* other) {
|
||||
return;
|
||||
|
||||
for (unsigned int x = 0; x < MAX_RAID_MEMBERS; x++) {
|
||||
if (members[x].member != NULL) // If Group Member is Client
|
||||
if (members[x].member != nullptr) // If Group Member is Client
|
||||
{
|
||||
Client *cmember = members[x].member;
|
||||
// add exp + exp cap
|
||||
@@ -650,7 +650,7 @@ void Client::SendLeadershipEXPUpdate() {
|
||||
|
||||
uint32 Client::GetCharMaxLevelFromQGlobal() {
|
||||
|
||||
QGlobalCache *char_c = NULL;
|
||||
QGlobalCache *char_c = nullptr;
|
||||
char_c = this->GetQGlobals();
|
||||
|
||||
std::list<QGlobal> globalMap;
|
||||
|
||||
+14
-14
@@ -210,7 +210,7 @@ void Mob::CalculateNewFearpoint()
|
||||
//old fear function, kept for ref.
|
||||
/*void Mob::SetFeared(Mob *caster, uint32 duration, bool flee) {
|
||||
//special args to stop fear
|
||||
if(caster == NULL && duration == 0) {
|
||||
if(caster == nullptr && duration == 0) {
|
||||
fear_state = fearStateNotFeared;
|
||||
#ifdef FLEE_HP_RATIO
|
||||
flee_mode = false;
|
||||
@@ -222,14 +222,14 @@ void Mob::CalculateNewFearpoint()
|
||||
flee_mode = flee;
|
||||
|
||||
//fear dosent work without at least maps
|
||||
if(zone->zonemap == NULL) {
|
||||
if(zone->zonemap == nullptr) {
|
||||
fear_state = fearStateStuck;
|
||||
return; //just stand there
|
||||
}
|
||||
|
||||
//if we are allready feared, and we are on a fear grid..
|
||||
//then just stay happy on the grid...
|
||||
if(fear_path_state != NULL) {
|
||||
if(fear_path_state != nullptr) {
|
||||
if(fear_state != fearStateGrid) {
|
||||
LogFile->write(EQEMuLog::Debug, "Umm... %s has a fear path state, but is not in a grid state. Wtf?", GetName());
|
||||
fear_state = fearStateGrid;
|
||||
@@ -247,7 +247,7 @@ void Mob::CalculateNewFearpoint()
|
||||
//now we have to think a little more.
|
||||
|
||||
//first, try to find a fear node that we can see.
|
||||
if(zone->pathing != NULL) {
|
||||
if(zone->pathing != nullptr) {
|
||||
fear_path_state = new MobFearState();
|
||||
if(zone->pathing->FindNearestFear(fear_path_state, GetX(), GetY(), GetZ())) {
|
||||
#ifdef FEAR_PATHING_DEBUG
|
||||
@@ -284,7 +284,7 @@ void Mob::CalculateNewFearpoint()
|
||||
//old fear function, kept for ref.
|
||||
bool Mob::FearTryStraight(Mob *caster, uint32 duration, bool flee, VERTEX &hit, VERTEX &fear_vector) {
|
||||
//gotta have somebody to run from
|
||||
if(caster == NULL)
|
||||
if(caster == nullptr)
|
||||
return(false);
|
||||
|
||||
//our goal is to run along this vector...
|
||||
@@ -310,7 +310,7 @@ bool Mob::FearTryStraight(Mob *caster, uint32 duration, bool flee, VERTEX &hit,
|
||||
end.y = start.y + fear_vector.y * distance;
|
||||
end.z = start.z;
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, NULL)) {
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, nullptr)) {
|
||||
#ifdef FEAR_PATHING_DEBUG
|
||||
LogFile->write(EQEMuLog::Debug, "Fear Pathing Start: can run entire vector from (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f)",
|
||||
GetX(), GetY(), GetZ(), end.x, end.y, end.z);
|
||||
@@ -328,7 +328,7 @@ bool Mob::FearTryStraight(Mob *caster, uint32 duration, bool flee, VERTEX &hit,
|
||||
|
||||
//old fear function, kept for ref.
|
||||
void Mob::CalculateFearPosition() {
|
||||
if(zone->zonemap == NULL || fear_state == fearStateStuck) {
|
||||
if(zone->zonemap == nullptr || fear_state == fearStateStuck) {
|
||||
return; //just stand there
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ void Mob::CalculateFearPosition() {
|
||||
}
|
||||
|
||||
//we wanted to try to find a waypoint now, so lets try..
|
||||
if(zone->pathing != NULL) {
|
||||
if(zone->pathing != nullptr) {
|
||||
fear_path_state = new MobFearState();
|
||||
|
||||
if(zone->pathing->FindNearestFear(fear_path_state, GetX(), GetY(), GetZ())) {
|
||||
@@ -473,7 +473,7 @@ void Mob::CalculateFearPosition() {
|
||||
end.y = start.y + fear_vector.y * 10;
|
||||
end.z = start.z;
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &normalhit, NULL)) {
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &normalhit, nullptr)) {
|
||||
#ifdef FEAR_PATHING_DEBUG
|
||||
LogFile->write(EQEMuLog::Debug, "Fear Pathing: From (%.2f, %.2f, %.2f) normal run to (%.2f, %.2f, %.2f)",
|
||||
GetX(), GetY(), GetZ(), end.x, end.y, end.z);
|
||||
@@ -514,7 +514,7 @@ void Mob::CalculateFearPosition() {
|
||||
|
||||
NodeRef c = zone->zonemap->SeekNode(zone->zonemap->GetRoot(), end.x, end.y);
|
||||
if(c != NODE_NONE) {
|
||||
cur_wp_z = zone->zonemap->FindBestZ(c, end, &hit, NULL);
|
||||
cur_wp_z = zone->zonemap->FindBestZ(c, end, &hit, nullptr);
|
||||
if(cur_wp_z < start.z)
|
||||
cur_wp_z = end.z; //revert on error
|
||||
}
|
||||
@@ -540,7 +540,7 @@ void Mob::CalculateFearPosition() {
|
||||
end.y = start.y + fear_vector.y * speed;
|
||||
end.z = start.z + speed + speed;
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, NULL)) {
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, nullptr)) {
|
||||
#ifdef FEAR_PATHING_DEBUG
|
||||
LogFile->write(EQEMuLog::Debug, "Fear Pathing: From (%.2f, %.2f, %.2f) up hill run to (%.2f, %.2f, %.2f)",
|
||||
GetX(), GetY(), GetZ(), end.x, end.y, end.z);
|
||||
@@ -555,7 +555,7 @@ void Mob::CalculateFearPosition() {
|
||||
|
||||
NodeRef c = zone->zonemap->SeekNode(zone->zonemap->GetRoot(), end.x, end.y);
|
||||
if(c != NODE_NONE) {
|
||||
cur_wp_z = zone->zonemap->FindBestZ(c, end, &hit, NULL);
|
||||
cur_wp_z = zone->zonemap->FindBestZ(c, end, &hit, nullptr);
|
||||
if(cur_wp_z < start.z)
|
||||
cur_wp_z = end.z; //revert on error
|
||||
}
|
||||
@@ -579,7 +579,7 @@ void Mob::CalculateFearPosition() {
|
||||
}
|
||||
end.z = start.z + 3; //a little lift as always
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, NULL)) {
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, nullptr)) {
|
||||
#ifdef FEAR_PATHING_DEBUG
|
||||
LogFile->write(EQEMuLog::Debug, "Fear Pathing: From (%.2f, %.2f, %.2f) strafe 1 to (%.2f, %.2f, %.2f)",
|
||||
GetX(), GetY(), GetZ(), end.x, end.y, end.z);
|
||||
@@ -602,7 +602,7 @@ void Mob::CalculateFearPosition() {
|
||||
}
|
||||
end.z = start.z + 3; //a little lift as always
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, NULL)) {
|
||||
if(!zone->zonemap->LineIntersectsZone(start, end, 0.5, &hit, nullptr)) {
|
||||
#ifdef FEAR_PATHING_DEBUG
|
||||
LogFile->write(EQEMuLog::Debug, "Fear Pathing: From (%.2f, %.2f, %.2f) strafe 2 to (%.2f, %.2f, %.2f)",
|
||||
GetX(), GetY(), GetZ(), end.x, end.y, end.z);
|
||||
|
||||
+26
-26
@@ -56,27 +56,27 @@ very low chance of dropping.
|
||||
|
||||
Schema:
|
||||
CREATE TABLE forage (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
zoneid int(4) NOT NULL default '0',
|
||||
Itemid int(11) NOT NULL default '0',
|
||||
level smallint(6) NOT NULL default '0',
|
||||
chance smallint(6) NOT NULL default '0',
|
||||
id int(11) NOT nullptr auto_increment,
|
||||
zoneid int(4) NOT nullptr default '0',
|
||||
Itemid int(11) NOT nullptr default '0',
|
||||
level smallint(6) NOT nullptr default '0',
|
||||
chance smallint(6) NOT nullptr default '0',
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
old table upgrade:
|
||||
alter table forage add chance smallint(6) NOT NULL default '0';
|
||||
alter table forage add chance smallint(6) NOT nullptr default '0';
|
||||
update forage set chance=100;
|
||||
|
||||
|
||||
CREATE TABLE fishing (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
zoneid int(4) NOT NULL default '0',
|
||||
Itemid int(11) NOT NULL default '0',
|
||||
skill_level smallint(6) NOT NULL default '0',
|
||||
chance smallint(6) NOT NULL default '0',
|
||||
npc_id int NOT NULL default 0,
|
||||
npc_chance int NOT NULL default 0,
|
||||
id int(11) NOT nullptr auto_increment,
|
||||
zoneid int(4) NOT nullptr default '0',
|
||||
Itemid int(11) NOT nullptr default '0',
|
||||
skill_level smallint(6) NOT nullptr default '0',
|
||||
chance smallint(6) NOT nullptr default '0',
|
||||
npc_id int NOT nullptr default 0,
|
||||
npc_chance int NOT nullptr default 0,
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
@@ -208,7 +208,7 @@ bool Client::CanFish() {
|
||||
//make sure we still have a fishing pole on:
|
||||
const ItemInst* Pole = m_inv[SLOT_PRIMARY];
|
||||
int32 bslot = m_inv.HasItemByUse(ItemTypeFishingBait, 1, invWhereWorn|invWherePersonal);
|
||||
const ItemInst* Bait = NULL;
|
||||
const ItemInst* Bait = nullptr;
|
||||
if(bslot != SLOT_INVALID)
|
||||
Bait = m_inv.GetItem(bslot);
|
||||
|
||||
@@ -225,7 +225,7 @@ bool Client::CanFish() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(zone->zonemap!=NULL && zone->watermap != NULL && RuleB(Watermap, CheckForWaterWhenFishing)) {
|
||||
if(zone->zonemap!=nullptr && zone->watermap != nullptr && RuleB(Watermap, CheckForWaterWhenFishing)) {
|
||||
float RodX, RodY, RodZ;
|
||||
// Tweak Rod and LineLength if required
|
||||
const float RodLength = RuleR(Watermap, FishingRodLength);
|
||||
@@ -246,7 +246,7 @@ bool Client::CanFish() {
|
||||
dest.z = z_pos+10;
|
||||
NodeRef n = zone->zonemap->SeekNode( zone->zonemap->GetRoot(), dest.x, dest.y);
|
||||
if(n != NODE_NONE) {
|
||||
RodZ = zone->zonemap->FindBestZ(n, dest, NULL, NULL) - 1;
|
||||
RodZ = zone->zonemap->FindBestZ(n, dest, nullptr, nullptr) - 1;
|
||||
bool in_lava = zone->watermap->InLava(RodX, RodY, RodZ);
|
||||
bool in_water = zone->watermap->InWater(RodX, RodY, RodZ) || zone->watermap->InVWater(RodX, RodY, RodZ);
|
||||
//Message(0, "Rod is at %4.3f, %4.3f, %4.3f, InWater says %d, InLava says %d", RodX, RodY, RodZ, in_water, in_lava);
|
||||
@@ -298,7 +298,7 @@ void Client::GoFish()
|
||||
|
||||
//make sure we still have a fishing pole on:
|
||||
int32 bslot = m_inv.HasItemByUse(ItemTypeFishingBait, 1, invWhereWorn|invWherePersonal);
|
||||
const ItemInst* Bait = NULL;
|
||||
const ItemInst* Bait = nullptr;
|
||||
if(bslot != SLOT_INVALID)
|
||||
Bait = m_inv.GetItem(bslot);
|
||||
|
||||
@@ -325,8 +325,8 @@ void Client::GoFish()
|
||||
if(npc_chance > 0 && npc_id) {
|
||||
if(npc_chance < MakeRandomInt(0, 99)) {
|
||||
const NPCType* tmp = database.GetNPCType(npc_id);
|
||||
if(tmp != NULL) {
|
||||
NPC* npc = new NPC(tmp, NULL, GetX()+3, GetY(), GetZ(), GetHeading(), FlyMode3);
|
||||
if(tmp != nullptr) {
|
||||
NPC* npc = new NPC(tmp, nullptr, GetX()+3, GetY(), GetZ(), GetHeading(), FlyMode3);
|
||||
npc->AddLootTable();
|
||||
|
||||
npc->AddToHateList(this, 1, 0, false); //no help yelling
|
||||
@@ -351,7 +351,7 @@ void Client::GoFish()
|
||||
|
||||
Message_StringID(MT_Skills, FISHING_SUCCESS);
|
||||
const ItemInst* inst = database.CreateItem(food_item, 1);
|
||||
if(inst != NULL) {
|
||||
if(inst != nullptr) {
|
||||
if(CheckLoreConflict(inst->GetItem()))
|
||||
{
|
||||
this->Message_StringID(0,DUP_LORE);
|
||||
@@ -366,7 +366,7 @@ void Client::GoFish()
|
||||
safe_delete(inst);
|
||||
}
|
||||
|
||||
parse->EventPlayer(EVENT_FISH_SUCCESS, this, "", inst != NULL ? inst->GetItem()->ID : 0);
|
||||
parse->EventPlayer(EVENT_FISH_SUCCESS, this, "", inst != nullptr ? inst->GetItem()->ID : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -393,7 +393,7 @@ void Client::GoFish()
|
||||
DeleteItemInInventory(13,0,true);
|
||||
}
|
||||
|
||||
if(CheckIncreaseSkill(FISHING, NULL, 5))
|
||||
if(CheckIncreaseSkill(FISHING, nullptr, 5))
|
||||
{
|
||||
if(title_manager.IsNewTradeSkillTitleAvailable(FISHING, GetRawSkill(FISHING)))
|
||||
NotifyNewTitlesAvailable();
|
||||
@@ -435,7 +435,7 @@ void Client::ForageItem(bool guarantee) {
|
||||
const Item_Struct* food_item = database.GetItem(foragedfood);
|
||||
|
||||
if(!food_item) {
|
||||
LogFile->write(EQEMuLog::Error, "NULL returned from database.GetItem in ClientForageItem");
|
||||
LogFile->write(EQEMuLog::Error, "nullptr returned from database.GetItem in ClientForageItem");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ void Client::ForageItem(bool guarantee) {
|
||||
|
||||
Message_StringID(MT_Skills, stringid);
|
||||
const ItemInst* inst = database.CreateItem(food_item, 1);
|
||||
if(inst != NULL) {
|
||||
if(inst != nullptr) {
|
||||
// check to make sure it isn't a foraged lore item
|
||||
if(CheckLoreConflict(inst->GetItem()))
|
||||
{
|
||||
@@ -475,7 +475,7 @@ void Client::ForageItem(bool guarantee) {
|
||||
safe_delete(inst);
|
||||
}
|
||||
|
||||
parse->EventPlayer(EVENT_FORAGE_SUCCESS, this, "", inst != NULL ? inst->GetItem()->ID : 0);
|
||||
parse->EventPlayer(EVENT_FORAGE_SUCCESS, this, "", inst != nullptr ? inst->GetItem()->ID : 0);
|
||||
|
||||
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
|
||||
if(!guarantee && MakeRandomInt(0,99) < ChanceSecondForage) {
|
||||
@@ -488,6 +488,6 @@ void Client::ForageItem(bool guarantee) {
|
||||
parse->EventPlayer(EVENT_FORAGE_FAILURE, this, "", 0);
|
||||
}
|
||||
|
||||
CheckIncreaseSkill(FORAGE, NULL, 5);
|
||||
CheckIncreaseSkill(FORAGE, nullptr, 5);
|
||||
|
||||
}
|
||||
|
||||
+40
-40
@@ -45,7 +45,7 @@ members array.
|
||||
Group::Group(uint32 gid)
|
||||
: GroupIDConsumer(gid)
|
||||
{
|
||||
leader = NULL;
|
||||
leader = nullptr;
|
||||
memset(members,0,sizeof(Mob*) * MAX_GROUP_MEMBERS);
|
||||
AssistTargetID = 0;
|
||||
TankTargetID = 0;
|
||||
@@ -119,7 +119,7 @@ void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinu
|
||||
uint32 i;
|
||||
uint8 membercount = 0;
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] != NULL) {
|
||||
if (members[i] != nullptr) {
|
||||
|
||||
membercount++;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinu
|
||||
msg += " as your split";
|
||||
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] != NULL && members[i]->IsClient()) { // If Group Member is Client
|
||||
if (members[i] != nullptr && members[i]->IsClient()) { // If Group Member is Client
|
||||
Client *c = members[i]->CastToClient();
|
||||
//I could not get MoneyOnCorpse to work, so we use this
|
||||
c->AddMoneyToPP(cpsplit, spsplit, gpsplit, ppsplit, true);
|
||||
@@ -208,7 +208,7 @@ bool Group::AddMember(Mob* newmember, const char *NewMemberName, uint32 Characte
|
||||
bool InZone = true;
|
||||
bool ismerc = false;
|
||||
|
||||
// This method should either be passed a Mob*, if the new member is in this zone, or a NULL Mob*
|
||||
// This method should either be passed a Mob*, if the new member is in this zone, or a nullptr Mob*
|
||||
// and the name and CharacterID of the new member, if they are out of zone.
|
||||
//
|
||||
if(!newmember && !NewMemberName)
|
||||
@@ -274,7 +274,7 @@ bool Group::AddMember(Mob* newmember, const char *NewMemberName, uint32 Characte
|
||||
gj->leader_aas = LeaderAbilities;
|
||||
|
||||
for (i = 0;i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] != NULL && members[i] != newmember) {
|
||||
if (members[i] != nullptr && members[i] != newmember) {
|
||||
//fill in group join & send it
|
||||
if(members[i]->IsMerc())
|
||||
{
|
||||
@@ -330,7 +330,7 @@ bool Group::AddMember(Mob* newmember, const char *NewMemberName, uint32 Characte
|
||||
}
|
||||
#ifdef BOTS
|
||||
for (i = 0;i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] != NULL && members[i]->IsBot()) {
|
||||
if (members[i] != nullptr && members[i]->IsBot()) {
|
||||
members[i]->CastToBot()->CalcChanceToCast();
|
||||
}
|
||||
}
|
||||
@@ -476,20 +476,20 @@ bool Group::UpdatePlayer(Mob* update){
|
||||
void Group::MemberZoned(Mob* removemob) {
|
||||
uint32 i;
|
||||
|
||||
if (removemob == NULL)
|
||||
if (removemob == nullptr)
|
||||
return;
|
||||
|
||||
if(removemob == GetLeader())
|
||||
SetLeader(NULL);
|
||||
SetLeader(nullptr);
|
||||
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] == removemob) {
|
||||
members[i] = NULL;
|
||||
members[i] = nullptr;
|
||||
//should NOT clear the name, it is used for world communication.
|
||||
break;
|
||||
}
|
||||
#ifdef BOTS
|
||||
if (members[i] != NULL && members[i]->IsBot()) {
|
||||
if (members[i] != nullptr && members[i]->IsBot()) {
|
||||
members[i]->CastToBot()->CalcChanceToCast();
|
||||
}
|
||||
#endif //BOTS
|
||||
@@ -539,13 +539,13 @@ bool Group::DelMemberOOZ(const char *Name) {
|
||||
|
||||
bool Group::DelMember(Mob* oldmember,bool ignoresender)
|
||||
{
|
||||
if (oldmember == NULL){
|
||||
if (oldmember == nullptr){
|
||||
return false;
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] == oldmember) {
|
||||
members[i] = NULL;
|
||||
members[i] = nullptr;
|
||||
membername[i][0] = '\0';
|
||||
memset(membername[i],0,64);
|
||||
MemberRoles[i] = 0;
|
||||
@@ -581,7 +581,7 @@ bool Group::DelMember(Mob* oldmember,bool ignoresender)
|
||||
gu->leader_aas = LeaderAbilities;
|
||||
|
||||
for (uint32 i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] == NULL) {
|
||||
if (members[i] == nullptr) {
|
||||
//if (DEBUG>=5) LogFile->write(EQEMuLog::Debug, "Group::DelMember() null member at slot %i", i);
|
||||
continue;
|
||||
}
|
||||
@@ -591,7 +591,7 @@ bool Group::DelMember(Mob* oldmember,bool ignoresender)
|
||||
members[i]->CastToClient()->QueuePacket(outapp);
|
||||
}
|
||||
#ifdef BOTS
|
||||
if (members[i] != NULL && members[i]->IsBot()) {
|
||||
if (members[i] != nullptr && members[i]->IsBot()) {
|
||||
members[i]->CastToBot()->CalcChanceToCast();
|
||||
}
|
||||
#endif //BOTS
|
||||
@@ -671,7 +671,7 @@ void Group::CastGroupSpell(Mob* caster, uint16 spell_id) {
|
||||
caster->SpellOnTarget(spell_id, caster->GetPet());
|
||||
#endif
|
||||
}
|
||||
else if(members[z] != NULL)
|
||||
else if(members[z] != nullptr)
|
||||
{
|
||||
distance = caster->DistNoRoot(*members[z]);
|
||||
if(distance <= range2) {
|
||||
@@ -710,7 +710,7 @@ void Group::GroupBardPulse(Mob* caster, uint16 spell_id) {
|
||||
caster->BardPulse(spell_id, caster->GetPet());
|
||||
#endif
|
||||
}
|
||||
else if(members[z] != NULL)
|
||||
else if(members[z] != nullptr)
|
||||
{
|
||||
distance = caster->DistNoRoot(*members[z]);
|
||||
if(distance <= range2) {
|
||||
@@ -789,11 +789,11 @@ void Group::DisbandGroup() {
|
||||
GroupUpdate_Struct* gu = (GroupUpdate_Struct*) outapp->pBuffer;
|
||||
gu->action = groupActDisband;
|
||||
|
||||
Client *Leader = NULL;
|
||||
Client *Leader = nullptr;
|
||||
|
||||
uint32 i;
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] == NULL) {
|
||||
if (members[i] == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ void Group::DisbandGroup() {
|
||||
}
|
||||
|
||||
members[i]->SetGrouped(false);
|
||||
members[i] = NULL;
|
||||
members[i] = nullptr;
|
||||
membername[i][0] = '\0';
|
||||
}
|
||||
|
||||
@@ -857,14 +857,14 @@ void Group::SendUpdate(uint32 type, Mob* member)
|
||||
gu->leader_aas = LeaderAbilities;
|
||||
|
||||
for (uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i)
|
||||
if((members[i] != NULL) && IsLeader(members[i]))
|
||||
if((members[i] != nullptr) && IsLeader(members[i]))
|
||||
{
|
||||
strcpy(gu->leadersname, members[i]->GetName());
|
||||
break;
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i)
|
||||
if (members[i] != NULL && members[i] != member)
|
||||
if (members[i] != nullptr && members[i] != member)
|
||||
strcpy(gu->membername[x++], members[i]->GetName());
|
||||
|
||||
member->CastToClient()->QueuePacket(outapp);
|
||||
@@ -949,7 +949,7 @@ void Group::TeleportGroup(Mob* sender, uint32 zoneID, uint16 instance_id, float
|
||||
uint32 i;
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++)
|
||||
{
|
||||
if (members[i] != NULL && members[i]->IsClient() && members[i] != sender)
|
||||
if (members[i] != nullptr && members[i]->IsClient() && members[i] != sender)
|
||||
{
|
||||
members[i]->CastToClient()->MovePC(zoneID, instance_id, x, y, z, heading, 0, ZoneSolicited);
|
||||
}
|
||||
@@ -973,7 +973,7 @@ bool Group::LearnMembers() {
|
||||
while((row = mysql_fetch_row(result))) {
|
||||
if(!row[0])
|
||||
continue;
|
||||
members[i] = NULL;
|
||||
members[i] = nullptr;
|
||||
strn0cpy(membername[i], row[0], 64);
|
||||
|
||||
i++;
|
||||
@@ -997,23 +997,23 @@ void Group::VerifyGroup() {
|
||||
#if EQDEBUG >= 7
|
||||
LogFile->write(EQEMuLog::Debug, "Group %lu: Verify %d: Empty.\n", (unsigned long)GetID(), i);
|
||||
#endif
|
||||
members[i] = NULL;
|
||||
members[i] = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
//it should be safe to use GetClientByName, but Group is trying
|
||||
//to be generic, so we'll go for general Mob
|
||||
Mob *them = entity_list.GetMob(membername[i]);
|
||||
if(them == NULL && members[i] != NULL) { //they arnt here anymore....
|
||||
if(them == nullptr && members[i] != nullptr) { //they arnt here anymore....
|
||||
#if EQDEBUG >= 6
|
||||
LogFile->write(EQEMuLog::Debug, "Member of group %lu named '%s' has disappeared!!", (unsigned long)GetID(), membername[i]);
|
||||
#endif
|
||||
membername[i][0] = '\0';
|
||||
members[i] = NULL;
|
||||
members[i] = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(them != NULL && members[i] != them) { //our pointer is out of date... not so good.
|
||||
if(them != nullptr && members[i] != them) { //our pointer is out of date... not so good.
|
||||
#if EQDEBUG >= 5
|
||||
LogFile->write(EQEMuLog::Debug, "Member of group %lu named '%s' had an out of date pointer!!", (unsigned long)GetID(), membername[i]);
|
||||
#endif
|
||||
@@ -1030,7 +1030,7 @@ LogFile->write(EQEMuLog::Debug, "Group %lu: Verify %d: Empty.\n", (unsigned long
|
||||
void Group::GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
|
||||
uint32 i;
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if(members[i] == NULL)
|
||||
if(members[i] == nullptr)
|
||||
continue;
|
||||
|
||||
if(members[i] == sender)
|
||||
@@ -1183,7 +1183,7 @@ void Group::MarkNPC(Mob* Target, int Number)
|
||||
if(i == (Number - 1))
|
||||
return;
|
||||
|
||||
UpdateXTargetMarkedNPC(i+1, NULL);
|
||||
UpdateXTargetMarkedNPC(i+1, nullptr);
|
||||
MarkedNPCs[i] = 0;
|
||||
|
||||
AlreadyMarked = true;
|
||||
@@ -1199,7 +1199,7 @@ void Group::MarkNPC(Mob* Target, int Number)
|
||||
if(m)
|
||||
m->IsTargeted(-1);
|
||||
|
||||
UpdateXTargetMarkedNPC(Number, NULL);
|
||||
UpdateXTargetMarkedNPC(Number, nullptr);
|
||||
}
|
||||
|
||||
if(EntityID)
|
||||
@@ -1274,7 +1274,7 @@ void Group::DelegateMainTank(const char *NewMainTankName, uint8 toggle)
|
||||
if(updateDB) {
|
||||
char errbuff[MYSQL_ERRMSG_SIZE];
|
||||
|
||||
char *Query = NULL;
|
||||
char *Query = nullptr;
|
||||
|
||||
if (!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE group_leaders SET maintank='%s' WHERE gid=%i LIMIT 1",
|
||||
MainTankName.c_str(), GetID()), errbuff))
|
||||
@@ -1323,7 +1323,7 @@ void Group::DelegateMainAssist(const char *NewMainAssistName, uint8 toggle)
|
||||
if(updateDB) {
|
||||
char errbuff[MYSQL_ERRMSG_SIZE];
|
||||
|
||||
char *Query = NULL;
|
||||
char *Query = nullptr;
|
||||
|
||||
if (!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE group_leaders SET assist='%s' WHERE gid=%i LIMIT 1",
|
||||
MainAssistName.c_str(), GetID()), errbuff))
|
||||
@@ -1372,7 +1372,7 @@ void Group::DelegatePuller(const char *NewPullerName, uint8 toggle)
|
||||
if(updateDB) {
|
||||
char errbuff[MYSQL_ERRMSG_SIZE];
|
||||
|
||||
char *Query = NULL;
|
||||
char *Query = nullptr;
|
||||
|
||||
if (!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE group_leaders SET puller='%s' WHERE gid=%i LIMIT 1",
|
||||
PullerName.c_str(), GetID()), errbuff))
|
||||
@@ -1539,8 +1539,8 @@ void Group::UnDelegateMainTank(const char *OldMainTankName, uint8 toggle)
|
||||
if(members[i] && members[i]->IsClient())
|
||||
{
|
||||
NotifyMainTank(members[i]->CastToClient(), toggle);
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupTank, NULL, "");
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupTankTarget, NULL);
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupTank, nullptr, "");
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupTankTarget, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1573,7 +1573,7 @@ void Group::UnDelegateMainAssist(const char *OldMainAssistName, uint8 toggle)
|
||||
if(members[i] && members[i]->IsClient())
|
||||
{
|
||||
members[i]->CastToClient()->QueuePacket(outapp);
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupAssist, NULL, "");
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupAssist, nullptr, "");
|
||||
}
|
||||
|
||||
safe_delete(outapp);
|
||||
@@ -1595,7 +1595,7 @@ void Group::UnDelegateMainAssist(const char *OldMainAssistName, uint8 toggle)
|
||||
if(members[i] && members[i]->IsClient())
|
||||
{
|
||||
NotifyMainAssist(members[i]->CastToClient(), toggle);
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupAssistTarget, NULL);
|
||||
members[i]->CastToClient()->UpdateXTargetType(GroupAssistTarget, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1625,8 +1625,8 @@ void Group::UnDelegatePuller(const char *OldPullerName, uint8 toggle)
|
||||
if(members[i] && members[i]->IsClient())
|
||||
{
|
||||
NotifyPuller(members[i]->CastToClient(), toggle);
|
||||
members[i]->CastToClient()->UpdateXTargetType(Puller, NULL, "");
|
||||
members[i]->CastToClient()->UpdateXTargetType(PullerTarget, NULL);
|
||||
members[i]->CastToClient()->UpdateXTargetType(Puller, nullptr, "");
|
||||
members[i]->CastToClient()->UpdateXTargetType(PullerTarget, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1895,7 +1895,7 @@ void Group::UnMarkNPC(uint16 ID)
|
||||
if(MarkedNPCs[i] == ID)
|
||||
{
|
||||
MarkedNPCs[i] = 0;
|
||||
UpdateXTargetMarkedNPC(i + 1, NULL);
|
||||
UpdateXTargetMarkedNPC(i + 1, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -51,7 +51,7 @@ public:
|
||||
Group(uint32 gid);
|
||||
~Group();
|
||||
|
||||
bool AddMember(Mob* newmember, const char* NewMemberName = NULL, uint32 CharacterID = 0);
|
||||
bool AddMember(Mob* newmember, const char* NewMemberName = nullptr, uint32 CharacterID = 0);
|
||||
void AddMember(const char* NewMemberName);
|
||||
void SendUpdate(uint32 type,Mob* member);
|
||||
void SendLeadershipAAUpdate();
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
void GroupMessage(Mob* sender,uint8 language,uint8 lang_skill,const char* message);
|
||||
void GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
||||
uint32 GetTotalGroupDamage(Mob* other);
|
||||
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter = NULL);
|
||||
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter = nullptr);
|
||||
inline void SetLeader(Mob* newleader){ leader=newleader; };
|
||||
inline Mob* GetLeader(){ return leader; };
|
||||
char* GetLeaderName() { return membername[0]; };
|
||||
|
||||
+3
-3
@@ -137,7 +137,7 @@ void Client::SendGuildList() {
|
||||
|
||||
//ask the guild manager to build us a nice guild list packet
|
||||
outapp->pBuffer = guild_mgr.MakeGuildList(/*GetName()*/"", outapp->size);
|
||||
if(outapp->pBuffer == NULL) {
|
||||
if(outapp->pBuffer == nullptr) {
|
||||
mlog(GUILDS__ERROR, "Unable to make guild list!");
|
||||
return;
|
||||
}
|
||||
@@ -152,13 +152,13 @@ void Client::SendGuildList() {
|
||||
void Client::SendGuildMembers() {
|
||||
uint32 len;
|
||||
uint8 *data = guild_mgr.MakeGuildMembers(GuildID(), GetName(), len);
|
||||
if(data == NULL)
|
||||
if(data == nullptr)
|
||||
return; //invalid guild, shouldent happen.
|
||||
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_GuildMemberList);
|
||||
outapp->size = len;
|
||||
outapp->pBuffer = data;
|
||||
data = NULL;
|
||||
data = nullptr;
|
||||
|
||||
mlog(GUILDS__OUT_PACKETS, "Sending OP_GuildMemberList of length %d", outapp->size);
|
||||
mpkt(GUILDS__OUT_PACKET_TRACE, outapp);
|
||||
|
||||
+46
-46
@@ -26,49 +26,49 @@
|
||||
/*
|
||||
|
||||
CREATE TABLE guilds (
|
||||
id MEDIUMINT UNSIGNED NOT NULL,
|
||||
name VARCHAR(32) NOT NULL,
|
||||
leader int NOT NULL,
|
||||
minstatus SMALLINT NOT NULL,
|
||||
tribute INT UNSIGNED NOT NULL,
|
||||
motd TEXT NOT NULL DEFAULT '',
|
||||
id MEDIUMINT UNSIGNED NOT nullptr,
|
||||
name VARCHAR(32) NOT nullptr,
|
||||
leader int NOT nullptr,
|
||||
minstatus SMALLINT NOT nullptr,
|
||||
tribute INT UNSIGNED NOT nullptr,
|
||||
motd TEXT NOT nullptr DEFAULT '',
|
||||
PRIMARY KEY(id),
|
||||
UNIQUE KEY(name),
|
||||
UNIQUE KEY(leader)
|
||||
);
|
||||
|
||||
CREATE TABLE guild_ranks (
|
||||
guild_id MEDIUMINT UNSIGNED NOT NULL,
|
||||
rank TINYINT UNSIGNED NOT NULL,
|
||||
title VARCHAR(128) NOT NULL,
|
||||
can_hear TINYINT UNSIGNED NOT NULL,
|
||||
can_speak TINYINT UNSIGNED NOT NULL,
|
||||
can_invite TINYINT UNSIGNED NOT NULL,
|
||||
can_remove TINYINT UNSIGNED NOT NULL,
|
||||
can_promote TINYINT UNSIGNED NOT NULL,
|
||||
can_demote TINYINT UNSIGNED NOT NULL,
|
||||
can_motd TINYINT UNSIGNED NOT NULL,
|
||||
can_warpeace TINYINT UNSIGNED NOT NULL,
|
||||
guild_id MEDIUMINT UNSIGNED NOT nullptr,
|
||||
rank TINYINT UNSIGNED NOT nullptr,
|
||||
title VARCHAR(128) NOT nullptr,
|
||||
can_hear TINYINT UNSIGNED NOT nullptr,
|
||||
can_speak TINYINT UNSIGNED NOT nullptr,
|
||||
can_invite TINYINT UNSIGNED NOT nullptr,
|
||||
can_remove TINYINT UNSIGNED NOT nullptr,
|
||||
can_promote TINYINT UNSIGNED NOT nullptr,
|
||||
can_demote TINYINT UNSIGNED NOT nullptr,
|
||||
can_motd TINYINT UNSIGNED NOT nullptr,
|
||||
can_warpeace TINYINT UNSIGNED NOT nullptr,
|
||||
PRIMARY KEY(guild_id,rank)
|
||||
);
|
||||
|
||||
# guild1 < guild2 by definition.
|
||||
CREATE TABLE guild_relations (
|
||||
guild1 MEDIUMINT UNSIGNED NOT NULL,
|
||||
guild2 MEDIUMINT UNSIGNED NOT NULL,
|
||||
relation TINYINT NOT NULL,
|
||||
guild1 MEDIUMINT UNSIGNED NOT nullptr,
|
||||
guild2 MEDIUMINT UNSIGNED NOT nullptr,
|
||||
relation TINYINT NOT nullptr,
|
||||
PRIMARY KEY(guild1, guild1)
|
||||
);
|
||||
|
||||
CREATE TABLE guild_members (
|
||||
char_id INT NOT NULL,
|
||||
guild_id MEDIUMINT UNSIGNED NOT NULL,
|
||||
rank TINYINT UNSIGNED NOT NULL,
|
||||
tribute_enable TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
total_tribute INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
last_tribute INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
banker TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
public_note TEXT NOT NULL DEFAULT '',
|
||||
char_id INT NOT nullptr,
|
||||
guild_id MEDIUMINT UNSIGNED NOT nullptr,
|
||||
rank TINYINT UNSIGNED NOT nullptr,
|
||||
tribute_enable TINYINT UNSIGNED NOT nullptr DEFAULT 0,
|
||||
total_tribute INT UNSIGNED NOT nullptr DEFAULT 0,
|
||||
last_tribute INT UNSIGNED NOT nullptr DEFAULT 0,
|
||||
banker TINYINT UNSIGNED NOT nullptr DEFAULT 0,
|
||||
public_note TEXT NOT nullptr DEFAULT '',
|
||||
PRIMARY KEY(char_id)
|
||||
);
|
||||
|
||||
@@ -166,7 +166,7 @@ uint8 *ZoneGuildManager::MakeGuildMembers(uint32 guild_id, const char *prefix_na
|
||||
|
||||
vector<CharGuildInfo *> members;
|
||||
if(!GetEntireGuild(guild_id, members))
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
|
||||
//figure out the actual packet length.
|
||||
uint32 fixed_length = sizeof(Internal_GuildMembers_Struct) + members.size()*sizeof(Internal_GuildMemberEntry_Struct);
|
||||
@@ -357,14 +357,14 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
|
||||
Client *c = entity_list.GetClientByCharID(s->char_id);
|
||||
|
||||
if(c != NULL) {
|
||||
if(c != nullptr) {
|
||||
//this reloads the char's guild info from the database and sends appearance updates
|
||||
c->RefreshGuildInfo();
|
||||
}
|
||||
|
||||
//it would be nice if we had the packet to send just a one-person update
|
||||
if(s->guild_id == GUILD_NONE) {
|
||||
if(c != NULL)
|
||||
if(c != nullptr)
|
||||
c->SendGuildMembers(); //only need to update this player's list (trying to clear it)
|
||||
} else {
|
||||
entity_list.SendGuildMembers(s->guild_id); //even send GUILD_NONE (empty)
|
||||
@@ -372,7 +372,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
|
||||
if(s->old_guild_id != 0 && s->old_guild_id != GUILD_NONE && s->old_guild_id != s->guild_id)
|
||||
entity_list.SendGuildMembers(s->old_guild_id);
|
||||
else if(c != NULL && s->guild_id != GUILD_NONE) {
|
||||
else if(c != nullptr && s->guild_id != GUILD_NONE) {
|
||||
//char is in zone, and has changed into a new guild, send MOTD.
|
||||
c->SendGuildMOTD();
|
||||
}
|
||||
@@ -403,7 +403,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
strn0cpy(gsrs->MemberName, sgrus->MemberName, sizeof(gsrs->MemberName));
|
||||
gsrs->Banker = sgrus->Banker;
|
||||
|
||||
entity_list.QueueClientsGuild(NULL, outapp, false, sgrus->GuildID);
|
||||
entity_list.QueueClientsGuild(nullptr, outapp, false, sgrus->GuildID);
|
||||
|
||||
safe_delete(outapp);
|
||||
}
|
||||
@@ -449,7 +449,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
gmus->InstanceID = 0; // I don't think we care what Instance they are in, for the Guild Management Window.
|
||||
gmus->LastSeen = sgmus->LastSeen;
|
||||
|
||||
entity_list.QueueClientsGuild(NULL, outapp, false, sgmus->GuildID);
|
||||
entity_list.QueueClientsGuild(nullptr, outapp, false, sgmus->GuildID);
|
||||
|
||||
safe_delete(outapp);
|
||||
}
|
||||
@@ -473,7 +473,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildMemberUpdate, sizeof(GuildMemberUpdate_Struct));
|
||||
GuildMemberUpdate_Struct *gmus = (GuildMemberUpdate_Struct*)outapp->pBuffer;
|
||||
char Name[64];
|
||||
gmus->LastSeen = time(NULL);
|
||||
gmus->LastSeen = time(nullptr);
|
||||
gmus->InstanceID = 0;
|
||||
gmus->GuildID = c->GuildID();
|
||||
for (int i=0;i<Count;i++)
|
||||
@@ -526,7 +526,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
gts->Toggle = Toggle;
|
||||
gts->TimePosted = TimePosted;
|
||||
gts->Name[0] = 0;
|
||||
entity_list.QueueClientsGuild(NULL, outapp, false, GuildID);
|
||||
entity_list.QueueClientsGuild(nullptr, outapp, false, GuildID);
|
||||
safe_delete(outapp);
|
||||
break;
|
||||
}
|
||||
@@ -850,7 +850,7 @@ bool GuildBankManager::IsAreaFull(uint32 GuildID, uint16 Area)
|
||||
if(Iterator == Banks.end())
|
||||
return true;
|
||||
|
||||
GuildBankItem* BankArea = NULL;
|
||||
GuildBankItem* BankArea = nullptr;
|
||||
|
||||
int AreaSize = 0;
|
||||
|
||||
@@ -885,7 +885,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32
|
||||
return false;
|
||||
}
|
||||
|
||||
GuildBankItem* BankArea = NULL;
|
||||
GuildBankItem* BankArea = nullptr;
|
||||
|
||||
int AreaSize = 0;
|
||||
|
||||
@@ -1131,21 +1131,21 @@ ItemInst* GuildBankManager::GetItem(uint32 GuildID, uint16 Area, uint16 SlotID,
|
||||
std::list<GuildBank*>::iterator Iterator = GetGuildBank(GuildID);
|
||||
|
||||
if(Iterator == Banks.end())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
GuildBankItem* BankArea = NULL;
|
||||
GuildBankItem* BankArea = nullptr;
|
||||
|
||||
ItemInst* inst = NULL;
|
||||
ItemInst* inst = nullptr;
|
||||
|
||||
if(Area == GuildBankDepositArea)
|
||||
{
|
||||
if((SlotID > (GUILD_BANK_DEPOSIT_AREA_SIZE - 1)))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
inst = database.CreateItem((*Iterator)->Items.DepositArea[SlotID].ItemID);
|
||||
|
||||
if(!inst)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
BankArea = &(*Iterator)->Items.DepositArea[0];
|
||||
}
|
||||
@@ -1153,12 +1153,12 @@ ItemInst* GuildBankManager::GetItem(uint32 GuildID, uint16 Area, uint16 SlotID,
|
||||
{
|
||||
|
||||
if((SlotID > (GUILD_BANK_MAIN_AREA_SIZE - 1)))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
inst = database.CreateItem((*Iterator)->Items.MainArea[SlotID].ItemID);
|
||||
|
||||
if(!inst)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
BankArea = &(*Iterator)->Items.MainArea[0];
|
||||
}
|
||||
@@ -1220,7 +1220,7 @@ bool GuildBankManager::DeleteItem(uint32 GuildID, uint16 Area, uint16 SlotID, ui
|
||||
|
||||
char* query = 0;
|
||||
|
||||
GuildBankItem* BankArea = NULL;
|
||||
GuildBankItem* BankArea = nullptr;
|
||||
|
||||
if(Area == GuildBankMainArea)
|
||||
{
|
||||
|
||||
+21
-21
@@ -33,7 +33,7 @@ extern Zone *zone;
|
||||
|
||||
HateList::HateList()
|
||||
{
|
||||
owner = NULL;
|
||||
owner = nullptr;
|
||||
}
|
||||
|
||||
HateList::~HateList()
|
||||
@@ -88,7 +88,7 @@ tHateEntry *HateList::Find(Mob *ent)
|
||||
return iterator.GetData();
|
||||
iterator.Advance();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void HateList::Set(Mob* other, uint32 in_hate, uint32 in_dam)
|
||||
@@ -106,17 +106,17 @@ void HateList::Set(Mob* other, uint32 in_hate, uint32 in_dam)
|
||||
Mob* HateList::GetDamageTop(Mob* hater)
|
||||
{
|
||||
_ZP(HateList_GetDamageTop);
|
||||
Mob* current = NULL;
|
||||
Group* grp = NULL;
|
||||
Raid* r = NULL;
|
||||
Mob* current = nullptr;
|
||||
Group* grp = nullptr;
|
||||
Raid* r = nullptr;
|
||||
uint32 dmg_amt = 0;
|
||||
|
||||
LinkedListIterator<tHateEntry*> iterator(list);
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements())
|
||||
{
|
||||
grp = NULL;
|
||||
r = NULL;
|
||||
grp = nullptr;
|
||||
r = nullptr;
|
||||
|
||||
if(iterator.GetData()->ent && iterator.GetData()->ent->IsClient()){
|
||||
r = entity_list.GetRaidByClient(iterator.GetData()->ent->CastToClient());
|
||||
@@ -131,7 +131,7 @@ Mob* HateList::GetDamageTop(Mob* hater)
|
||||
dmg_amt = r->GetTotalRaidDamage(hater);
|
||||
}
|
||||
}
|
||||
else if (iterator.GetData()->ent != NULL && grp != NULL)
|
||||
else if (iterator.GetData()->ent != nullptr && grp != nullptr)
|
||||
{
|
||||
if (grp->GetTotalGroupDamage(hater) >= dmg_amt)
|
||||
{
|
||||
@@ -139,7 +139,7 @@ Mob* HateList::GetDamageTop(Mob* hater)
|
||||
dmg_amt = grp->GetTotalGroupDamage(hater);
|
||||
}
|
||||
}
|
||||
else if (iterator.GetData()->ent != NULL && (uint32)iterator.GetData()->damage >= dmg_amt)
|
||||
else if (iterator.GetData()->ent != nullptr && (uint32)iterator.GetData()->damage >= dmg_amt)
|
||||
{
|
||||
current = iterator.GetData()->ent;
|
||||
dmg_amt = iterator.GetData()->damage;
|
||||
@@ -151,7 +151,7 @@ Mob* HateList::GetDamageTop(Mob* hater)
|
||||
|
||||
Mob* HateList::GetClosest(Mob *hater) {
|
||||
_ZP(HateList_GetClosest);
|
||||
Mob* close = NULL;
|
||||
Mob* close = nullptr;
|
||||
float closedist = 99999.9f;
|
||||
float thisdist;
|
||||
|
||||
@@ -159,7 +159,7 @@ Mob* HateList::GetClosest(Mob *hater) {
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
thisdist = iterator.GetData()->ent->DistNoRootNoZ(*hater);
|
||||
if(iterator.GetData()->ent != NULL && thisdist <= closedist) {
|
||||
if(iterator.GetData()->ent != nullptr && thisdist <= closedist) {
|
||||
closedist = thisdist;
|
||||
close = iterator.GetData()->ent;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ void HateList::DoFactionHits(int32 nfl_id) {
|
||||
if (iterator.GetData()->ent && iterator.GetData()->ent->IsClient())
|
||||
p = iterator.GetData()->ent->CastToClient();
|
||||
else
|
||||
p = NULL;
|
||||
p = nullptr;
|
||||
|
||||
if (p)
|
||||
p->SetFactionLevel(p->CharacterID(), nfl_id, p->GetBaseClass(), p->GetBaseRace(), p->GetDeity());
|
||||
@@ -254,11 +254,11 @@ void HateList::DoFactionHits(int32 nfl_id) {
|
||||
Mob *HateList::GetTop(Mob *center)
|
||||
{
|
||||
_ZP(HateList_GetTop);
|
||||
Mob* top = NULL;
|
||||
Mob* top = nullptr;
|
||||
int32 hate = -1;
|
||||
|
||||
if (RuleB(Aggro,SmartAggroList)){
|
||||
Mob* topClientTypeInRange = NULL;
|
||||
Mob* topClientTypeInRange = nullptr;
|
||||
int32 hateClientTypeInRange = -1;
|
||||
int skipped_count = 0;
|
||||
|
||||
@@ -351,7 +351,7 @@ Mob *HateList::GetTop(Mob *center)
|
||||
iterator.Advance();
|
||||
}
|
||||
|
||||
if(topClientTypeInRange != NULL && top != NULL) {
|
||||
if(topClientTypeInRange != nullptr && top != nullptr) {
|
||||
bool isTopClientType = top->IsClient();
|
||||
#ifdef BOTS
|
||||
if(!isTopClientType) {
|
||||
@@ -375,7 +375,7 @@ Mob *HateList::GetTop(Mob *center)
|
||||
return top;
|
||||
}
|
||||
else {
|
||||
if(top == NULL && skipped_count > 0) {
|
||||
if(top == nullptr && skipped_count > 0) {
|
||||
return center->GetTarget();
|
||||
}
|
||||
return top;
|
||||
@@ -396,14 +396,14 @@ Mob *HateList::GetTop(Mob *center)
|
||||
}
|
||||
}
|
||||
|
||||
if(cur->ent != NULL && ((cur->hate > hate) || cur->bFrenzy ))
|
||||
if(cur->ent != nullptr && ((cur->hate > hate) || cur->bFrenzy ))
|
||||
{
|
||||
top = cur->ent;
|
||||
hate = cur->hate;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
if(top == NULL && skipped_count > 0) {
|
||||
if(top == nullptr && skipped_count > 0) {
|
||||
return center->GetTarget();
|
||||
}
|
||||
return top;
|
||||
@@ -413,7 +413,7 @@ Mob *HateList::GetTop(Mob *center)
|
||||
Mob *HateList::GetMostHate(){
|
||||
_ZP(HateList_GetMostHate);
|
||||
|
||||
Mob* top = NULL;
|
||||
Mob* top = nullptr;
|
||||
int32 hate = -1;
|
||||
|
||||
LinkedListIterator<tHateEntry*> iterator(list);
|
||||
@@ -421,7 +421,7 @@ Mob *HateList::GetMostHate(){
|
||||
while(iterator.MoreElements())
|
||||
{
|
||||
tHateEntry *cur = iterator.GetData();
|
||||
if(cur->ent != NULL && (cur->hate > hate))
|
||||
if(cur->ent != nullptr && (cur->hate > hate))
|
||||
{
|
||||
top = cur->ent;
|
||||
hate = cur->hate;
|
||||
@@ -443,7 +443,7 @@ Mob *HateList::GetRandom()
|
||||
count++;
|
||||
}
|
||||
if(!count)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
int random = MakeRandomInt(0, count-1);
|
||||
iterator.Reset();
|
||||
|
||||
+2
-2
@@ -49,9 +49,9 @@ public:
|
||||
Mob *GetTop(Mob *center);
|
||||
// gets any on the list
|
||||
Mob *GetRandom();
|
||||
// get closest mob or NULL if list empty
|
||||
// get closest mob or nullptr if list empty
|
||||
Mob *GetClosest(Mob *hater);
|
||||
// gets top mob or NULL if hate list empty
|
||||
// gets top mob or nullptr if hate list empty
|
||||
Mob *GetDamageTop(Mob *hater);
|
||||
// used to check if mob is on hatelist
|
||||
bool IsOnHateList(Mob *);
|
||||
|
||||
+6
-6
@@ -31,7 +31,7 @@ map<uint16, const NPCType *> Horse::horse_types;
|
||||
LinkedList<NPCType *> horses_auto_delete;
|
||||
|
||||
Horse::Horse(Client *_owner, uint16 spell_id, float x, float y, float z, float heading)
|
||||
: NPC(GetHorseType(spell_id), NULL, x, y, z, heading, FlyMode3)
|
||||
: NPC(GetHorseType(spell_id), nullptr, x, y, z, heading, FlyMode3)
|
||||
{
|
||||
//give the horse its proper name.
|
||||
strn0cpy(name, _owner->GetCleanName(), 55);
|
||||
@@ -55,13 +55,13 @@ bool Horse::IsHorseSpell(uint16 spell_id) {
|
||||
//than we need to to figure out if this is a horse spell.
|
||||
//the logic is that people calling this function will post
|
||||
//likely immediately summon the horse, so we need the extra anyways.
|
||||
return(GetHorseType(spell_id) != NULL);
|
||||
return(GetHorseType(spell_id) != nullptr);
|
||||
}
|
||||
|
||||
const NPCType *Horse::GetHorseType(uint16 spell_id) {
|
||||
if(horse_types.count(spell_id) == 1)
|
||||
return(horse_types[spell_id]);
|
||||
//cache invalid spell IDs as NULL entries
|
||||
//cache invalid spell IDs as nullptr entries
|
||||
const NPCType *ret;
|
||||
horse_types[spell_id] = ret = BuildHorseType(spell_id);
|
||||
return(ret);
|
||||
@@ -124,12 +124,12 @@ const NPCType *Horse::BuildHorseType(uint16 spell_id) {
|
||||
safe_delete_array(query);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in Mount query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -183,7 +183,7 @@ void Client::SetHorseId(uint16 horseid_in) {
|
||||
//if we have a horse, get rid of it no matter what.
|
||||
if(horseId) {
|
||||
Mob *horse = entity_list.GetMob(horseId);
|
||||
if(horse != NULL)
|
||||
if(horse != nullptr)
|
||||
horse->Depop();
|
||||
}
|
||||
|
||||
|
||||
+20
-20
@@ -38,7 +38,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) {
|
||||
if (itemnum == 0)
|
||||
return 0;
|
||||
uint32 x = 0;
|
||||
ItemInst *cur = NULL;
|
||||
ItemInst *cur = nullptr;
|
||||
|
||||
int i;
|
||||
if(where_to_check & invWhereWorn) {
|
||||
@@ -201,7 +201,7 @@ bool Client::CheckLoreConflict(const Item_Struct* item) {
|
||||
void Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, bool attuned, uint16 to_slot) {
|
||||
const Item_Struct* item = database.GetItem(item_id);
|
||||
|
||||
if (item == NULL) {
|
||||
if (item == nullptr) {
|
||||
Message(0, "No such item: %i", item_id);
|
||||
return;
|
||||
} else {
|
||||
@@ -340,7 +340,7 @@ void Client::DropItem(int16 slot_id)
|
||||
list<ItemInst*>::const_iterator s=m_inv.cursor_begin(),e=m_inv.cursor_end();
|
||||
database.SaveCursor(CharacterID(), s, e);
|
||||
} else
|
||||
database.SaveInventory(CharacterID(), NULL, slot_id);
|
||||
database.SaveInventory(CharacterID(), nullptr, slot_id);
|
||||
|
||||
// Package as zone object
|
||||
Object* object = new Object(this, inst);
|
||||
@@ -467,7 +467,7 @@ void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_upd
|
||||
|
||||
bool isDeleted = m_inv.DeleteItem(slot_id, quantity);
|
||||
|
||||
const ItemInst* inst=NULL;
|
||||
const ItemInst* inst=nullptr;
|
||||
if (slot_id==SLOT_CURSOR) {
|
||||
list<ItemInst*>::const_iterator s=m_inv.cursor_begin(),e=m_inv.cursor_end();
|
||||
if(update_db)
|
||||
@@ -569,7 +569,7 @@ void Client::PutLootInInventory(int16 slot_id, const ItemInst &inst, ServerLootI
|
||||
// solar: our bag went into slot_id, now let's pack the contents in
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
if(bag_item_data[i] == NULL)
|
||||
if(bag_item_data[i] == nullptr)
|
||||
continue;
|
||||
const ItemInst *bagitem = database.CreateItem(bag_item_data[i]->item_id, bag_item_data[i]->charges, bag_item_data[i]->aug1, bag_item_data[i]->aug2, bag_item_data[i]->aug3, bag_item_data[i]->aug4, bag_item_data[i]->aug5);
|
||||
interior_slot = Inventory::CalcSlotId(slot_id, i);
|
||||
@@ -1032,7 +1032,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = NULL;
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(items) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
@@ -1142,7 +1142,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
|
||||
// Step 3: Check for interaction with World Container (tradeskills)
|
||||
if(m_tradeskill_object != NULL) {
|
||||
if(m_tradeskill_object != nullptr) {
|
||||
if (src_slot_id>=4000 && src_slot_id<=4009) {
|
||||
// Picking up item from world container
|
||||
ItemInst* inst = m_tradeskill_object->PopItem(Inventory::CalcBagIdx(src_slot_id));
|
||||
@@ -1161,7 +1161,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
ItemInst* world_inst = m_tradeskill_object->PopItem(world_idx);
|
||||
|
||||
// Case 1: No item in container, unidirectional "Put"
|
||||
if (world_inst == NULL) {
|
||||
if (world_inst == nullptr) {
|
||||
m_tradeskill_object->PutItem(world_idx, src_inst);
|
||||
m_inv.DeleteItem(src_slot_id);
|
||||
}
|
||||
@@ -1277,7 +1277,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
if (src_inst->GetCharges() < 1)
|
||||
{
|
||||
mlog(INVENTORY__SLOTS, "Dest (%d) now has %d charges, source (%d) was entirely consumed. (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, usedcharges);
|
||||
database.SaveInventory(CharacterID(),NULL,src_slot_id);
|
||||
database.SaveInventory(CharacterID(),nullptr,src_slot_id);
|
||||
m_inv.DeleteItem(src_slot_id);
|
||||
} else {
|
||||
mlog(INVENTORY__SLOTS, "Dest (%d) now has %d charges, source (%d) has %d (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, src_inst->GetCharges(), usedcharges);
|
||||
@@ -1748,7 +1748,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
mlog(INVENTORY__ERROR, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, NULL, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
m_inv.PutItem(slot_id, *inst);
|
||||
@@ -1762,7 +1762,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
mlog(INVENTORY__ERROR, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, NULL, 9999);
|
||||
database.SaveInventory(character_id, nullptr, 9999);
|
||||
}
|
||||
else {
|
||||
m_inv.PutItem(9999, *inst);
|
||||
@@ -1776,7 +1776,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
mlog(INVENTORY__ERROR, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, NULL, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
m_inv.PutItem(slot_id, *inst);
|
||||
@@ -1791,7 +1791,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
mlog(INVENTORY__ERROR, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, NULL, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
m_inv.PutItem(slot_id, *inst);
|
||||
@@ -1806,7 +1806,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
mlog(INVENTORY__ERROR, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, NULL, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
m_inv.PutItem(slot_id, *inst);
|
||||
@@ -1830,7 +1830,7 @@ void Client::MoveSlotNotAllowed(bool client_update) {
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
mlog(INVENTORY__ERROR, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, client_update);
|
||||
database.SaveInventory(character_id, NULL, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
safe_delete(inst);
|
||||
}
|
||||
}
|
||||
@@ -1843,7 +1843,7 @@ void Client::MoveSlotNotAllowed(bool client_update) {
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
mlog(INVENTORY__ERROR, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, (GetClientVersion() >= EQClientSoF) ? client_update : false);
|
||||
database.SaveInventory(character_id, NULL, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
safe_delete(inst);
|
||||
}
|
||||
|
||||
@@ -1967,8 +1967,8 @@ void Client::SendItemPacket(int16 slot_id, const ItemInst* inst, ItemPacketType
|
||||
string packet = inst->Serialize(slot_id);
|
||||
|
||||
EmuOpcode opcode = OP_Unknown;
|
||||
EQApplicationPacket* outapp = NULL;
|
||||
ItemPacket_Struct* itempacket = NULL;
|
||||
EQApplicationPacket* outapp = nullptr;
|
||||
ItemPacket_Struct* itempacket = nullptr;
|
||||
|
||||
// Construct packet
|
||||
opcode = (packet_type==ItemPacketViewLink) ? OP_ItemLinkResponse : OP_ItemPacket;
|
||||
@@ -1992,8 +1992,8 @@ EQApplicationPacket* Client::ReturnItemPacket(int16 slot_id, const ItemInst* ins
|
||||
string packet = inst->Serialize(slot_id);
|
||||
|
||||
EmuOpcode opcode = OP_Unknown;
|
||||
EQApplicationPacket* outapp = NULL;
|
||||
BulkItemPacket_Struct* itempacket = NULL;
|
||||
EQApplicationPacket* outapp = nullptr;
|
||||
BulkItemPacket_Struct* itempacket = nullptr;
|
||||
|
||||
// Construct packet
|
||||
opcode = OP_ItemPacket;
|
||||
|
||||
+7
-7
@@ -176,7 +176,7 @@ void ZoneDatabase::AddLootDropToNPC(NPC* npc,uint32 lootdrop_id, ItemList* iteml
|
||||
|
||||
//if itemlist is null, just send wear changes
|
||||
void NPC::AddLootDrop(const Item_Struct *item2, ItemList* itemlist, int16 charges, uint8 minlevel, uint8 maxlevel, bool equipit, bool wearchange) {
|
||||
if(item2 == NULL)
|
||||
if(item2 == nullptr)
|
||||
return;
|
||||
|
||||
//make sure we are doing something...
|
||||
@@ -188,8 +188,8 @@ void NPC::AddLootDrop(const Item_Struct *item2, ItemList* itemlist, int16 charge
|
||||
LogFile->write(EQEMuLog::Debug, "Adding drop to npc: %s, Item: %i", GetName(), item2->ID);
|
||||
#endif
|
||||
|
||||
EQApplicationPacket* outapp = NULL;
|
||||
WearChange_Struct* wc = NULL;
|
||||
EQApplicationPacket* outapp = nullptr;
|
||||
WearChange_Struct* wc = nullptr;
|
||||
if(wearchange) {
|
||||
outapp = new EQApplicationPacket(OP_WearChange, sizeof(WearChange_Struct));
|
||||
wc = (WearChange_Struct*)outapp->pBuffer;
|
||||
@@ -209,7 +209,7 @@ void NPC::AddLootDrop(const Item_Struct *item2, ItemList* itemlist, int16 charge
|
||||
if (equipit) {
|
||||
uint8 eslot = 0xFF;
|
||||
char newid[20];
|
||||
const Item_Struct* compitem = NULL;
|
||||
const Item_Struct* compitem = nullptr;
|
||||
bool found = false; // track if we found an empty slot we fit into
|
||||
int32 foundslot = -1; // for multi-slot items
|
||||
|
||||
@@ -285,7 +285,7 @@ void NPC::AddLootDrop(const Item_Struct *item2, ItemList* itemlist, int16 charge
|
||||
eslot = MATERIAL_PRIMARY;
|
||||
}
|
||||
else if (foundslot == SLOT_SECONDARY
|
||||
&& (GetOwner() != NULL || (GetLevel() >= 13 && MakeRandomInt(0,99) < NPC_DW_CHANCE) || (item2->Damage==0)) &&
|
||||
&& (GetOwner() != nullptr || (GetLevel() >= 13 && MakeRandomInt(0,99) < NPC_DW_CHANCE) || (item2->Damage==0)) &&
|
||||
(item2->ItemType == ItemType1HS || item2->ItemType == ItemType1HB || item2->ItemType == ItemTypeShield ||
|
||||
item2->ItemType == ItemTypePierce))
|
||||
{
|
||||
@@ -346,7 +346,7 @@ void NPC::AddLootDrop(const Item_Struct *item2, ItemList* itemlist, int16 charge
|
||||
item->equipSlot = item2->Slots;
|
||||
}
|
||||
|
||||
if(itemlist != NULL)
|
||||
if(itemlist != nullptr)
|
||||
itemlist->push_back(item);
|
||||
else
|
||||
safe_delete(item);
|
||||
@@ -365,7 +365,7 @@ void NPC::AddItem(const Item_Struct* item, uint16 charges, bool equipitem) {
|
||||
void NPC::AddItem(uint32 itemid, uint16 charges, bool equipitem) {
|
||||
//slot isnt needed, its determined from the item.
|
||||
const Item_Struct * i = database.GetItem(itemid);
|
||||
if(i == NULL)
|
||||
if(i == nullptr)
|
||||
return;
|
||||
AddLootDrop(i, &itemlist, charges, 1, 127, equipitem, equipitem);
|
||||
}
|
||||
|
||||
+5
-5
@@ -100,7 +100,7 @@ typedef struct _nodeHeader {
|
||||
|
||||
uint8 flags;
|
||||
union {
|
||||
uint16 nodes[4]; //index 0 means NULL, not root
|
||||
uint16 nodes[4]; //index 0 means nullptr, not root
|
||||
struct {
|
||||
uint32 count;
|
||||
uint32 offset;
|
||||
@@ -125,7 +125,7 @@ typedef uint16 NodeRef;
|
||||
|
||||
class Map {
|
||||
public:
|
||||
static Map* LoadMapfile(const char* in_zonename, const char *directory = NULL);
|
||||
static Map* LoadMapfile(const char* in_zonename, const char *directory = nullptr);
|
||||
|
||||
Map();
|
||||
~Map();
|
||||
@@ -142,10 +142,10 @@ public:
|
||||
bool LocWithinNode( NodeRef _node, float x, float y ) const;
|
||||
|
||||
//nodes to these functions must be final
|
||||
bool LineIntersectsNode( NodeRef _node, VERTEX start, VERTEX end, VERTEX *result, FACE **on = NULL) const;
|
||||
bool LineIntersectsNode( NodeRef _node, VERTEX start, VERTEX end, VERTEX *result, FACE **on = nullptr) const;
|
||||
bool LineIntersectsFace( PFACE cface, VERTEX start, VERTEX end, VERTEX *result) const;
|
||||
float FindBestZ( NodeRef _node, VERTEX start, VERTEX *result, FACE **on = NULL) const;
|
||||
bool LineIntersectsZone(VERTEX start, VERTEX end, float step, VERTEX *result, FACE **on = NULL) const;
|
||||
float FindBestZ( NodeRef _node, VERTEX start, VERTEX *result, FACE **on = nullptr) const;
|
||||
bool LineIntersectsZone(VERTEX start, VERTEX end, float step, VERTEX *result, FACE **on = nullptr) const;
|
||||
|
||||
// inline unsigned int GetVertexNumber( ) {return m_Vertex; }
|
||||
inline uint32 GetFacesNumber( ) const { return m_Faces; }
|
||||
|
||||
+23
-23
@@ -1521,7 +1521,7 @@ void Merc::AI_Process() {
|
||||
if(DivineAura())
|
||||
return;
|
||||
|
||||
int hateCount = entity_list.GetHatedCount(this, NULL);
|
||||
int hateCount = entity_list.GetHatedCount(this, nullptr);
|
||||
if(GetHatedCount() < hateCount) {
|
||||
SetHatedCount(hateCount);
|
||||
|
||||
@@ -2126,7 +2126,7 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
||||
|
||||
switch (iSpellTypes) {
|
||||
case SpellType_Heal: {
|
||||
Mob* tar = NULL;
|
||||
Mob* tar = nullptr;
|
||||
int8 numToHeal = g->GetNumberNeedingHealedInGroup(IsEngaged() ? 75 : 95, true);
|
||||
int8 checkHPR = IsEngaged() ? 95 : 99;
|
||||
int8 checkPetHPR = IsEngaged() ? 95 : 99;
|
||||
@@ -2440,7 +2440,7 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
||||
break;
|
||||
}
|
||||
case SpellType_Cure: {
|
||||
Mob* tar = NULL;
|
||||
Mob* tar = nullptr;
|
||||
for(int i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if(g->members[i] && !g->members[i]->qglobal) {
|
||||
if(GetNeedsCured(g->members[i]) && (g->members[i]->DontCureMeBefore() < Timer::GetCurrentTime())) {
|
||||
@@ -2679,7 +2679,7 @@ int16 Merc::GetFocusEffect(focusType type, uint16 spell_id) {
|
||||
//item focus
|
||||
for(int x =0; x < MAX_WORN_INVENTORY; ++x)
|
||||
{
|
||||
TempItem = NULL;
|
||||
TempItem = nullptr;
|
||||
if (equipment[x] == 0)
|
||||
continue;
|
||||
TempItem = database.GetItem(equipment[x]);
|
||||
@@ -4420,7 +4420,7 @@ bool Merc::CheckAETaunt() {
|
||||
}
|
||||
|
||||
Corpse* Merc::GetGroupMemberCorpse() {
|
||||
Corpse* corpse = NULL;
|
||||
Corpse* corpse = nullptr;
|
||||
|
||||
if(HasGroup()) {
|
||||
Group* g = GetGroup();
|
||||
@@ -4652,7 +4652,7 @@ float Merc::GetMaxMeleeRangeToTarget(Mob* target) {
|
||||
}
|
||||
|
||||
void Merc::DoClassAttacks(Mob *target) {
|
||||
if(target == NULL)
|
||||
if(target == nullptr)
|
||||
return; //gotta have a target for all these
|
||||
|
||||
bool ca_time = classattack_timer.Check(false);
|
||||
@@ -4691,7 +4691,7 @@ void Merc::DoClassAttacks(Mob *target) {
|
||||
DoAnim(animKick);
|
||||
int32 dmg = 0;
|
||||
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)NULL) <= 0){
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)nullptr) <= 0){
|
||||
dmg = -5;
|
||||
}
|
||||
else{
|
||||
@@ -4713,7 +4713,7 @@ void Merc::DoClassAttacks(Mob *target) {
|
||||
DoAnim(animTailRake);
|
||||
int32 dmg = 0;
|
||||
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)NULL) <= 0){
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)nullptr) <= 0){
|
||||
dmg = -5;
|
||||
}
|
||||
else{
|
||||
@@ -4743,7 +4743,7 @@ bool Merc::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, boo
|
||||
_ZP(Client_Attack);
|
||||
|
||||
if (!other) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Merc::Attack() for evaluation!");
|
||||
return false;
|
||||
}
|
||||
@@ -4798,7 +4798,7 @@ void Merc::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_sk
|
||||
Save();
|
||||
|
||||
Mob *give_exp = hate_list.GetDamageTop(this);
|
||||
Client *give_exp_client = NULL;
|
||||
Client *give_exp_client = nullptr;
|
||||
|
||||
if(give_exp && give_exp->IsClient())
|
||||
give_exp_client = give_exp->CastToClient();
|
||||
@@ -4817,7 +4817,7 @@ void Merc::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_sk
|
||||
// br->SplitExp((EXP_FORMULA), this);
|
||||
|
||||
// if(br->GetBotMainTarget() == this)
|
||||
// br->SetBotMainTarget(NULL);
|
||||
// br->SetBotMainTarget(nullptr);
|
||||
|
||||
// /* Send the EVENT_KILLED_MERIT event for all raid members */
|
||||
// if(br->BotRaidGroups[0]) {
|
||||
@@ -5048,7 +5048,7 @@ Merc* Merc::LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id,
|
||||
//get mercenary data
|
||||
if(merc_template) {
|
||||
const NPCType* npc_type_to_copy = database.GetMercType(merc_template->MercNPCID, merc_template->RaceID, c->GetLevel()); //TODO: Maybe add a way of updating client merc stats in a seperate function? like, for example, on leveling up.
|
||||
if(npc_type_to_copy != NULL)
|
||||
if(npc_type_to_copy != nullptr)
|
||||
{
|
||||
NPCType* npc_type = new NPCType; //This is actually a very terrible method of assigning stats, and should be changed at some point. See the comment in merc's deconstructor.
|
||||
memset(npc_type, 0, sizeof(NPCType));
|
||||
@@ -5458,7 +5458,7 @@ bool Client::CheckCanDismissMerc() {
|
||||
void Client::CheckMercSuspendTimer()
|
||||
{
|
||||
if(GetMercInfo().SuspendedTime != 0) {
|
||||
if(time(NULL) >= GetMercInfo().SuspendedTime){
|
||||
if(time(nullptr) >= GetMercInfo().SuspendedTime){
|
||||
SendMercSuspendResponsePacket(0);
|
||||
}
|
||||
}
|
||||
@@ -5539,7 +5539,7 @@ void Client::SpawnMercOnZone()
|
||||
SendMercPersonalInfo();
|
||||
|
||||
if(GetMercInfo().SuspendedTime != 0) {
|
||||
if(time(NULL) >= GetMercInfo().SuspendedTime){
|
||||
if(time(nullptr) >= GetMercInfo().SuspendedTime){
|
||||
GetMercInfo().SuspendedTime = 0;
|
||||
}
|
||||
}
|
||||
@@ -5571,7 +5571,7 @@ bool Merc::Suspend() {
|
||||
SetSuspended(true);
|
||||
|
||||
mercOwner->GetMercInfo().IsSuspended = true;
|
||||
mercOwner->GetMercInfo().SuspendedTime = time(NULL) + RuleI(Mercs, SuspendIntervalS);
|
||||
mercOwner->GetMercInfo().SuspendedTime = time(nullptr) + RuleI(Mercs, SuspendIntervalS);
|
||||
mercOwner->GetMercInfo().MercTimerRemaining = mercOwner->GetMercTimer()->GetRemainingTime();
|
||||
mercOwner->GetMercInfo().Stance = GetStance();
|
||||
Save();
|
||||
@@ -5622,7 +5622,7 @@ bool Merc::Unsuspend(bool setMaxStats) {
|
||||
|
||||
if(!g) {
|
||||
delete g;
|
||||
g = NULL;
|
||||
g = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5630,7 +5630,7 @@ bool Merc::Unsuspend(bool setMaxStats) {
|
||||
|
||||
if(g->GetID() == 0) {
|
||||
delete g;
|
||||
g = NULL;
|
||||
g = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5770,7 +5770,7 @@ bool Merc::AddMercToGroup(Merc* merc, Group* group) {
|
||||
Merc::RemoveMercFromGroup(merc, merc->GetGroup());
|
||||
}
|
||||
//Try and add the member, followed by checking if the merc owner exists.
|
||||
if(group->AddMember(merc) && merc->GetMercOwner() != NULL) {
|
||||
if(group->AddMember(merc) && merc->GetMercOwner() != nullptr) {
|
||||
merc->SetFollowID(merc->GetMercOwner()->GetID());
|
||||
Result = true;
|
||||
}
|
||||
@@ -5791,17 +5791,17 @@ void Client::InitializeMercInfo() {
|
||||
|
||||
Merc* Client::GetMerc() {
|
||||
if(GetMercID() == 0)
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
|
||||
Merc* tmp = entity_list.GetMercByID(GetMercID());
|
||||
if(tmp == NULL) {
|
||||
if(tmp == nullptr) {
|
||||
SetMercID(0);
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
if(tmp->GetOwnerID() != GetID()) {
|
||||
SetMercID(0);
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
return(tmp);
|
||||
@@ -5843,7 +5843,7 @@ void Client::SetMerc(Merc* newmerc) {
|
||||
SetMercID(0);
|
||||
GetMercInfo().mercid = 0;
|
||||
GetMercInfo().MercTemplateID = 0;
|
||||
GetMercInfo().myTemplate = NULL;
|
||||
GetMercInfo().myTemplate = nullptr;
|
||||
GetMercInfo().IsSuspended = false;
|
||||
GetMercInfo().SuspendedTime = 0;
|
||||
GetMercInfo().Gender = 0;
|
||||
|
||||
+27
-27
@@ -122,7 +122,7 @@ Mob::Mob(const char* in_name,
|
||||
rewind_z = 0; //Stored z_pos for /rewind
|
||||
move_tic_count = 0;
|
||||
|
||||
_egnode = NULL;
|
||||
_egnode = nullptr;
|
||||
adverrorinfo = 0;
|
||||
name[0]=0;
|
||||
orig_name[0]=0;
|
||||
@@ -196,7 +196,7 @@ Mob::Mob(const char* in_name,
|
||||
ExtraHaste = 0;
|
||||
bEnraged = false;
|
||||
|
||||
shield_target = NULL;
|
||||
shield_target = nullptr;
|
||||
cur_mana = 0;
|
||||
max_mana = 0;
|
||||
hp_regen = in_hp_regen;
|
||||
@@ -961,7 +961,7 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
|
||||
snprintf(buf, 9, "%i", GetNextHPEvent());
|
||||
buf[9] = '\0';
|
||||
SetNextHPEvent(-1);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), NULL, buf, 0);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -973,7 +973,7 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
|
||||
snprintf(buf, 9, "%i", GetNextIncHPEvent());
|
||||
buf[9] = '\0';
|
||||
SetNextIncHPEvent(-1);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), NULL, buf, 1);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1117,7 +1117,7 @@ void Mob::SendPosUpdate(uint8 iSendToSelf) {
|
||||
}
|
||||
else
|
||||
{
|
||||
entity_list.QueueCloseClients(this, app, (iSendToSelf==0), 800, NULL, false);
|
||||
entity_list.QueueCloseClients(this, app, (iSendToSelf==0), 800, nullptr, false);
|
||||
move_tic_count++;
|
||||
}
|
||||
#endif
|
||||
@@ -1507,7 +1507,7 @@ void Mob::SendAppearancePacket(uint32 type, uint32 value, bool WholeZone, bool i
|
||||
appearance->parameter = value;
|
||||
if (WholeZone)
|
||||
entity_list.QueueClients(this, outapp, iIgnoreSelf);
|
||||
else if(specific_target != NULL)
|
||||
else if(specific_target != nullptr)
|
||||
specific_target->QueuePacket(outapp, false, Client::CLIENT_CONNECTED);
|
||||
else if (this->IsClient())
|
||||
this->CastToClient()->QueuePacket(outapp, false, Client::CLIENT_CONNECTED);
|
||||
@@ -1555,7 +1555,7 @@ void Mob::SendAppearanceEffect(uint32 parm1, uint32 parm2, uint32 parm3, uint32
|
||||
la->value4b = 1;
|
||||
la->value5a = 1;
|
||||
la->value5b = 1;
|
||||
if(specific_target == NULL) {
|
||||
if(specific_target == nullptr) {
|
||||
entity_list.QueueClients(this,outapp);
|
||||
}
|
||||
else if (specific_target->IsClient()) {
|
||||
@@ -1570,7 +1570,7 @@ void Mob::SendTargetable(bool on, Client *specific_target) {
|
||||
ut->id = GetID();
|
||||
ut->targetable_flag = on == true ? 1 : 0;
|
||||
|
||||
if(specific_target == NULL) {
|
||||
if(specific_target == nullptr) {
|
||||
entity_list.QueueClients(this, outapp);
|
||||
}
|
||||
else if (specific_target->IsClient()) {
|
||||
@@ -1858,8 +1858,8 @@ void Mob::SetAttackTimer() {
|
||||
//an invalid weapon equipped:
|
||||
attack_timer.SetAtTrigger(4000, true);
|
||||
|
||||
Timer* TimerToUse = NULL;
|
||||
const Item_Struct* PrimaryWeapon = NULL;
|
||||
Timer* TimerToUse = nullptr;
|
||||
const Item_Struct* PrimaryWeapon = nullptr;
|
||||
|
||||
for (int i=SLOT_RANGE; i<=SLOT_SECONDARY; i++) {
|
||||
|
||||
@@ -1873,7 +1873,7 @@ void Mob::SetAttackTimer() {
|
||||
else //invalid slot (hands will always hit this)
|
||||
continue;
|
||||
|
||||
const Item_Struct* ItemToUse = NULL;
|
||||
const Item_Struct* ItemToUse = nullptr;
|
||||
|
||||
//find our item
|
||||
if (IsClient()) {
|
||||
@@ -1885,13 +1885,13 @@ void Mob::SetAttackTimer() {
|
||||
//The code before here was fundementally flawed because equipment[]
|
||||
//isn't the same as PC inventory and also:
|
||||
//NPCs don't use weapon speed to dictate how fast they hit anyway.
|
||||
ItemToUse = NULL;
|
||||
ItemToUse = nullptr;
|
||||
}
|
||||
|
||||
//special offhand stuff
|
||||
if(i == SLOT_SECONDARY) {
|
||||
//if we have a 2H weapon in our main hand, no dual
|
||||
if(PrimaryWeapon != NULL) {
|
||||
if(PrimaryWeapon != nullptr) {
|
||||
if( PrimaryWeapon->ItemClass == ItemClassCommon
|
||||
&& (PrimaryWeapon->ItemType == ItemType2HS
|
||||
|| PrimaryWeapon->ItemType == ItemType2HB
|
||||
@@ -1918,18 +1918,18 @@ void Mob::SetAttackTimer() {
|
||||
}
|
||||
|
||||
//see if we have a valid weapon
|
||||
if(ItemToUse != NULL) {
|
||||
if(ItemToUse != nullptr) {
|
||||
//check type and damage/delay
|
||||
if(ItemToUse->ItemClass != ItemClassCommon
|
||||
|| ItemToUse->Damage == 0
|
||||
|| ItemToUse->Delay == 0) {
|
||||
//no weapon
|
||||
ItemToUse = NULL;
|
||||
ItemToUse = nullptr;
|
||||
}
|
||||
// Check to see if skill is valid
|
||||
else if((ItemToUse->ItemType > ItemTypeThrowing) && (ItemToUse->ItemType != ItemTypeHand2Hand) && (ItemToUse->ItemType != ItemType2HPierce)) {
|
||||
//no weapon
|
||||
ItemToUse = NULL;
|
||||
ItemToUse = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1938,7 +1938,7 @@ void Mob::SetAttackTimer() {
|
||||
DelayMod = -99;
|
||||
|
||||
//if we have no weapon..
|
||||
if (ItemToUse == NULL) {
|
||||
if (ItemToUse == nullptr) {
|
||||
//above checks ensure ranged weapons do not fall into here
|
||||
// Work out if we're a monk
|
||||
if ((GetClass() == MONK) || (GetClass() == BEASTLORD)) {
|
||||
@@ -2258,7 +2258,7 @@ bool Mob::HateSummon() {
|
||||
// check if mob has ability to summon
|
||||
// 97% is the offical % that summoning starts on live, not 94
|
||||
// if the mob can summon and is charmed, it can only summon mobs it has LoS to
|
||||
Mob* mob_owner = NULL;
|
||||
Mob* mob_owner = nullptr;
|
||||
if(GetOwnerID())
|
||||
mob_owner = entity_list.GetMob(GetOwnerID());
|
||||
|
||||
@@ -2819,7 +2819,7 @@ void Mob::SetTarget(Mob* mob) {
|
||||
if(IsNPC())
|
||||
parse->EventNPC(EVENT_TARGET_CHANGE, CastToNPC(), mob, "", 0); //parse->Event(EVENT_TARGET_CHANGE, this->GetNPCTypeID(), 0, this->CastToNPC(), mob);
|
||||
else if (IsClient())
|
||||
parse->EventPlayer(EVENT_TARGET_CHANGE, CastToClient(), "", 0); //parse->Event(EVENT_TARGET_CHANGE, 0, "", (NPC*)NULL, this->CastToClient());
|
||||
parse->EventPlayer(EVENT_TARGET_CHANGE, CastToClient(), "", 0); //parse->Event(EVENT_TARGET_CHANGE, 0, "", (NPC*)nullptr, this->CastToClient());
|
||||
|
||||
if(IsPet() && GetOwner() && GetOwner()->IsClient())
|
||||
GetOwner()->CastToClient()->UpdateXTargetType(MyPetTarget, mob);
|
||||
@@ -2959,7 +2959,7 @@ const char* Mob::GetEntityVariable(const char *id)
|
||||
{
|
||||
return iter->second.c_str();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool Mob::EntityVariableExists(const char *id)
|
||||
@@ -3059,7 +3059,7 @@ void Mob::TriggerOnCast(uint32 focus_spell, uint32 spell_id, bool aa_trigger)
|
||||
|
||||
void Mob::TrySpellTrigger(Mob *target, uint32 spell_id)
|
||||
{
|
||||
if(target == NULL || !IsValidSpell(spell_id))
|
||||
if(target == nullptr || !IsValidSpell(spell_id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3111,7 +3111,7 @@ void Mob::TrySpellTrigger(Mob *target, uint32 spell_id)
|
||||
|
||||
void Mob::TryApplyEffect(Mob *target, uint32 spell_id)
|
||||
{
|
||||
if(target == NULL || !IsValidSpell(spell_id))
|
||||
if(target == nullptr || !IsValidSpell(spell_id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3309,7 +3309,7 @@ bool Mob::TryFadeEffect(int slot)
|
||||
|
||||
void Mob::TrySympatheticProc(Mob *target, uint32 spell_id)
|
||||
{
|
||||
if(target == NULL || !IsValidSpell(spell_id))
|
||||
if(target == nullptr || !IsValidSpell(spell_id))
|
||||
return;
|
||||
|
||||
int focus_spell = CastToClient()->GetSympatheticFocusEffect(focusSympatheticProc,spell_id);
|
||||
@@ -3784,12 +3784,12 @@ void Mob::InsertQuestGlobal(int charid, int npcid, int zoneid, const char *varna
|
||||
char *query = 0;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
|
||||
// Make duration string either "unix_timestamp(now()) + xxx" or "NULL"
|
||||
// Make duration string either "unix_timestamp(now()) + xxx" or "nullptr"
|
||||
stringstream duration_ss;
|
||||
|
||||
if (duration == INT_MAX)
|
||||
{
|
||||
duration_ss << "NULL";
|
||||
duration_ss << "nullptr";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4182,7 +4182,7 @@ bool Mob::TryReflectSpell(uint32 spell_id)
|
||||
|
||||
void Mob::DoGravityEffect()
|
||||
{
|
||||
Mob *caster = NULL;
|
||||
Mob *caster = nullptr;
|
||||
int away = -1;
|
||||
float caster_x, caster_y, amount, value, cur_x, my_x, cur_y, my_y, x_vector, y_vector, hypot;
|
||||
|
||||
@@ -4274,7 +4274,7 @@ void Mob::SpreadVirus(uint16 spell_id, uint16 casterID)
|
||||
int num_targs = spells[spell_id].viral_targets;
|
||||
|
||||
Mob* caster = entity_list.GetMob(casterID);
|
||||
Mob* target = NULL;
|
||||
Mob* target = nullptr;
|
||||
// Only spread in zones without perm buffs
|
||||
if(!zone->BuffTimersSuspended()) {
|
||||
for(int i = 0; i < num_targs; i++) {
|
||||
|
||||
+22
-22
@@ -122,8 +122,8 @@ public:
|
||||
//Appearance
|
||||
void SendLevelAppearance();
|
||||
void SendAppearanceEffect(uint32 parm1, uint32 parm2, uint32 parm3, uint32 parm4, uint32 parm5,
|
||||
Client *specific_target=NULL);
|
||||
void SendTargetable(bool on, Client *specific_target = NULL);
|
||||
Client *specific_target=nullptr);
|
||||
void SendTargetable(bool on, Client *specific_target = nullptr);
|
||||
virtual void SendWearChange(uint8 material_slot);
|
||||
virtual void SendTextureWC(uint8 slot, uint16 texture, uint32 hero_forge_model = 0, uint32 elite_material = 0,
|
||||
uint32 unknown06 = 0, uint32 unknown18 = 0);
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
|
||||
//Spell
|
||||
void SendSpellEffect(uint32 effectid, uint32 duration, uint32 finish_delay, bool zone_wide,
|
||||
uint32 unk020, bool perm_effect = false, Client *c = NULL);
|
||||
uint32 unk020, bool perm_effect = false, Client *c = nullptr);
|
||||
bool IsBeneficialAllowed(Mob *target);
|
||||
virtual int GetCasterLevel(uint16 spell_id);
|
||||
void ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* newbon, uint16 casterID = 0,
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
virtual void SpellProcess();
|
||||
virtual bool CastSpell(uint16 spell_id, uint16 target_id, uint16 slot = 10, int32 casttime = -1,
|
||||
int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF,
|
||||
uint32 timer = 0xFFFFFFFF, uint32 timer_duration = 0, uint32 type = 0, int16 *resist_adjust = NULL);
|
||||
uint32 timer = 0xFFFFFFFF, uint32 timer_duration = 0, uint32 type = 0, int16 *resist_adjust = nullptr);
|
||||
virtual bool DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot = 10, int32 casttime = -1,
|
||||
int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF,
|
||||
uint32 timer = 0xFFFFFFFF, uint32 timer_duration = 0, uint32 type = 0, int16 resist_adjust = 0);
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
virtual int GetMaxSongSlots() const { return 0; }
|
||||
virtual int GetMaxDiscSlots() const { return 0; }
|
||||
virtual int GetMaxTotalSlots() const { return 0; }
|
||||
virtual void InitializeBuffSlots() { buffs = NULL; current_buff_count = 0; }
|
||||
virtual void InitializeBuffSlots() { buffs = nullptr; current_buff_count = 0; }
|
||||
virtual void UninitializeBuffSlots() { }
|
||||
inline bool HasRune() const { return m_hasRune; }
|
||||
inline bool HasSpellRune() const { return m_hasSpellRune; }
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
|
||||
//Basic Stats/Inventory
|
||||
virtual void SetLevel(uint8 in_level, bool command = false) { level = in_level; }
|
||||
void TempName(const char *newname = NULL);
|
||||
void TempName(const char *newname = nullptr);
|
||||
void SetTargetable(bool on);
|
||||
bool IsTargetable() const { return m_targetable; }
|
||||
virtual uint16 GetSkill(SkillType skill_num) const { return 0; }
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
bool ChangeHP(Mob* other, int32 amount, uint16 spell_id = 0, int8 buffslot = -1, bool iBuffTic = false);
|
||||
inline void SetOOCRegen(int32 newoocregen) {oocregen = newoocregen;}
|
||||
virtual void Heal();
|
||||
virtual void HealDamage(uint32 ammount, Mob* caster = NULL);
|
||||
virtual void HealDamage(uint32 ammount, Mob* caster = nullptr);
|
||||
virtual void SetMaxHP() { cur_hp = max_hp; }
|
||||
virtual inline uint16 GetBaseRace() const { return base_race; }
|
||||
virtual inline uint8 GetBaseGender() const { return base_gender; }
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
inline const char* GetOrigName() const { return orig_name; }
|
||||
inline const char* GetLastName() const { return lastname; }
|
||||
const char *GetCleanName();
|
||||
virtual void SetName(const char *new_name = NULL) { new_name ? strn0cpy(name, new_name, 64) :
|
||||
virtual void SetName(const char *new_name = nullptr) { new_name ? strn0cpy(name, new_name, 64) :
|
||||
strn0cpy(name, GetName(), 64); return; };
|
||||
inline Mob* GetTarget() const { return target; }
|
||||
virtual void SetTarget(Mob* mob);
|
||||
@@ -417,8 +417,8 @@ public:
|
||||
inline const uint32 LastChange() const { return pLastChange; }
|
||||
|
||||
//Quest
|
||||
void QuestReward(Client *c = NULL, uint32 silver = 0, uint32 gold = 0, uint32 platinum = 0);
|
||||
void CameraEffect(uint32 duration, uint32 intensity, Client *c = NULL, bool global = false);
|
||||
void QuestReward(Client *c = nullptr, uint32 silver = 0, uint32 gold = 0, uint32 platinum = 0);
|
||||
void CameraEffect(uint32 duration, uint32 intensity, Client *c = nullptr, bool global = false);
|
||||
inline bool GetQglobal() const { return qglobal; }
|
||||
|
||||
//Other Packet
|
||||
@@ -434,8 +434,8 @@ public:
|
||||
static uint8 GetDefaultGender(uint16 in_race, uint8 in_gender = 0xFF);
|
||||
static void CreateSpawnPacket(EQApplicationPacket* app, NewSpawn_Struct* ns);
|
||||
uint16 GetSkillByItemType(int ItemType);
|
||||
virtual void MakePet(uint16 spell_id, const char* pettype, const char *petname = NULL);
|
||||
virtual void MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, const char *petname = NULL);
|
||||
virtual void MakePet(uint16 spell_id, const char* pettype, const char *petname = nullptr);
|
||||
virtual void MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, const char *petname = nullptr);
|
||||
bool IsWarriorClass() const;
|
||||
char GetCasterClass() const;
|
||||
uint8 GetArchetype() const;
|
||||
@@ -505,8 +505,8 @@ public:
|
||||
virtual void UnStun();
|
||||
inline void Silence(bool newval) { silenced = newval; }
|
||||
inline void Amnesia(bool newval) { amnesiad = newval; }
|
||||
void TemporaryPets(uint16 spell_id, Mob *target, const char *name_override = NULL, uint32 duration_override = 0);
|
||||
void TypesTemporaryPets(uint32 typesid, Mob *target, const char *name_override = NULL, uint32 duration_override = 0, bool followme = false);
|
||||
void TemporaryPets(uint16 spell_id, Mob *target, const char *name_override = nullptr, uint32 duration_override = 0);
|
||||
void TypesTemporaryPets(uint32 typesid, Mob *target, const char *name_override = nullptr, uint32 duration_override = 0, bool followme = false);
|
||||
void WakeTheDead(uint16 spell_id, Mob *target, uint32 duration);
|
||||
void Spin();
|
||||
void Kill();
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
void CastOnCurer(uint32 spell_id);
|
||||
void CastOnCure(uint32 spell_id);
|
||||
void CastOnNumHitFade(uint32 spell_id);
|
||||
int SlowMitigation(bool slow_msg=false, Mob *caster = NULL,int slow_value = 0);
|
||||
int SlowMitigation(bool slow_msg=false, Mob *caster = nullptr,int slow_value = 0);
|
||||
int16 GetCritDmgMob(uint16 skill);
|
||||
int16 GetMeleeDamageMod_SE(uint16 skill);
|
||||
int16 GetMeleeMinDamageMod_SE(uint16 skill);
|
||||
@@ -565,7 +565,7 @@ public:
|
||||
uint8 GetFlurryChance() { return NPC_FlurryChance; }
|
||||
|
||||
static uint32 GetAppearanceValue(EmuAppearance iAppearance);
|
||||
void SendAppearancePacket(uint32 type, uint32 value, bool WholeZone = true, bool iIgnoreSelf = false, Client *specific_target=NULL);
|
||||
void SendAppearancePacket(uint32 type, uint32 value, bool WholeZone = true, bool iIgnoreSelf = false, Client *specific_target=nullptr);
|
||||
void SetAppearance(EmuAppearance app, bool iIgnoreSelf = true);
|
||||
inline EmuAppearance GetAppearance() const { return _appearance; }
|
||||
inline const uint8 GetRunAnimSpeed() const { return pRunAnimSpeed; }
|
||||
@@ -635,9 +635,9 @@ public:
|
||||
int32 AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTic, Mob* attacker);
|
||||
|
||||
virtual void DoSpecialAttackDamage(Mob *who, SkillType skill, int32 max_damage, int32 min_damage = 1, int32 hate_override = -1, int ReuseTime = 10, bool HitChance=false);
|
||||
virtual void DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon=NULL, const Item_Struct* item=NULL, uint16 weapon_damage=0, int16 chance_mod=0,int16 focus=0);
|
||||
virtual void DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon=nullptr, const Item_Struct* item=nullptr, uint16 weapon_damage=0, int16 chance_mod=0,int16 focus=0);
|
||||
virtual void DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skillinuse, int16 chance_mod=0, int16 focus=0, bool CanRiposte=false);
|
||||
virtual void DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon=NULL, const ItemInst* Ammo=NULL, uint16 weapon_damage=0, int16 chance_mod=0, int16 focus=0);
|
||||
virtual void DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon=nullptr, const ItemInst* Ammo=nullptr, uint16 weapon_damage=0, int16 chance_mod=0, int16 focus=0);
|
||||
bool CanDoSpecialAttack(Mob *other);
|
||||
bool Flurry();
|
||||
bool Rampage();
|
||||
@@ -742,9 +742,9 @@ public:
|
||||
virtual uint32 GetAA(uint32 aa_id) const { return(0); }
|
||||
|
||||
uint16 GetInstrumentMod(uint16 spell_id) const;
|
||||
int CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level = 1, Mob *caster = NULL, int ticsremaining = 0);
|
||||
int CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level = 1, Mob *caster = nullptr, int ticsremaining = 0);
|
||||
int CalcSpellEffectValue_formula(int formula, int base, int max, int caster_level, uint16 spell_id, int ticsremaining = 0);
|
||||
virtual int CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, int caster_level2, Mob* caster1 = NULL, Mob* caster2 = NULL);
|
||||
virtual int CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, int caster_level2, Mob* caster1 = nullptr, Mob* caster2 = nullptr);
|
||||
uint32 GetCastedSpellInvSlot() const { return casting_spell_inventory_slot; }
|
||||
|
||||
// HP Event
|
||||
@@ -782,7 +782,7 @@ public:
|
||||
inline virtual bool IsBlockedBuff(int16 SpellID) { return false; }
|
||||
inline virtual bool IsBlockedPetBuff(int16 SpellID) { return false; }
|
||||
|
||||
void SetGlobal(const char *varname, const char *newvalue, int options, const char *duration, Mob *other = NULL);
|
||||
void SetGlobal(const char *varname, const char *newvalue, int options, const char *duration, Mob *other = nullptr);
|
||||
void TarGlobal(const char *varname, const char *value, const char *duration, int npcid, int charid, int zoneid);
|
||||
void DelGlobal(const char *varname);
|
||||
|
||||
@@ -919,7 +919,7 @@ protected:
|
||||
virtual float GetProcChances(float &ProcBonus, float &ProcChance, uint16 weapon_speed = 30, uint16 hand = 13);
|
||||
virtual float GetDefensiveProcChances(float &ProcBonus, float &ProcChance, uint16 weapon_speed = 30, uint16 hand = 13);
|
||||
int GetWeaponDamage(Mob *against, const Item_Struct *weapon_item);
|
||||
int GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate = NULL);
|
||||
int GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate = nullptr);
|
||||
int GetKickDamage();
|
||||
int GetBashDamage();
|
||||
virtual void ApplySpecialAttackMod(SkillType skill, int32 &dmg, int32 &mindmg);
|
||||
|
||||
+3
-3
@@ -96,7 +96,7 @@ EQStreamFactory eqsf(ZoneStream);
|
||||
npcDecayTimes_Struct npcCorpseDecayTimes[100];
|
||||
TitleManager title_manager;
|
||||
DBAsyncFinishedQueue MTdbafq;
|
||||
DBAsync *dbasync = NULL;
|
||||
DBAsync *dbasync = nullptr;
|
||||
TaskManager *taskmanager = 0;
|
||||
QuestParserCollection *parse = 0;
|
||||
|
||||
@@ -174,7 +174,7 @@ int main(int argc, char** argv) {
|
||||
dbasync->AddFQ(&MTdbafq);
|
||||
guild_mgr.SetDatabase(&database);
|
||||
|
||||
GuildBanks = NULL;
|
||||
GuildBanks = nullptr;
|
||||
|
||||
#ifdef _EQDEBUG
|
||||
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
@@ -238,7 +238,7 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
_log(ZONE__INIT, "Loading spells");
|
||||
EQEmu::MemoryMappedFile *mmf = NULL;
|
||||
EQEmu::MemoryMappedFile *mmf = nullptr;
|
||||
LoadSpells(&mmf);
|
||||
|
||||
_log(ZONE__INIT, "Loading guilds");
|
||||
|
||||
+18
-18
@@ -123,12 +123,12 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
|
||||
int moblevel=GetLevel();
|
||||
|
||||
NPCTypedata = d;
|
||||
NPCTypedata_ours = NULL;
|
||||
NPCTypedata_ours = nullptr;
|
||||
respawn2 = in_respawn;
|
||||
swarm_timer.Disable();
|
||||
|
||||
taunting = false;
|
||||
proximity = NULL;
|
||||
proximity = nullptr;
|
||||
copper = 0;
|
||||
silver = 0;
|
||||
gold = 0;
|
||||
@@ -141,7 +141,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
|
||||
max_wp=0;
|
||||
save_wp = 0;
|
||||
spawn_group = 0;
|
||||
swarmInfoPtr = NULL;
|
||||
swarmInfoPtr = nullptr;
|
||||
spellscale = d->spellscale;
|
||||
healscale = d->healscale;
|
||||
|
||||
@@ -345,7 +345,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
|
||||
}
|
||||
reface_timer = new Timer(15000);
|
||||
reface_timer->Disable();
|
||||
qGlobals = NULL;
|
||||
qGlobals = nullptr;
|
||||
guard_x_saved = 0;
|
||||
guard_y_saved = 0;
|
||||
guard_z_saved = 0;
|
||||
@@ -361,7 +361,7 @@ NPC::~NPC()
|
||||
entity_list.RemoveNPC(GetID());
|
||||
AI_Stop();
|
||||
|
||||
if(proximity != NULL) {
|
||||
if(proximity != nullptr) {
|
||||
entity_list.RemoveProximity(GetID());
|
||||
safe_delete(proximity);
|
||||
}
|
||||
@@ -431,7 +431,7 @@ ServerLootItem_Struct* NPC::GetItem(int slot_id) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
void NPC::RemoveItem(uint32 item_id, uint16 quantity, uint16 slot) {
|
||||
@@ -457,7 +457,7 @@ void NPC::RemoveItem(uint32 item_id, uint16 quantity, uint16 slot) {
|
||||
|
||||
void NPC::CheckMinMaxLevel(Mob *them)
|
||||
{
|
||||
if(them == NULL || !them->IsClient())
|
||||
if(them == nullptr || !them->IsClient())
|
||||
return;
|
||||
|
||||
uint16 themlevel = them->GetLevel();
|
||||
@@ -1011,7 +1011,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
}
|
||||
else
|
||||
{
|
||||
// row[0] is NULL - No npc_type IDs set in this range yet
|
||||
// row[0] is nullptr - No npc_type IDs set in this range yet
|
||||
npc_type_id = starting_npc_id;
|
||||
}
|
||||
}
|
||||
@@ -1123,7 +1123,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
safe_delete_array(query);
|
||||
|
||||
row = mysql_fetch_row(result);
|
||||
if (row == NULL) return false;
|
||||
if (row == nullptr) return false;
|
||||
if (row[0]) tmp = atoi(row[0]);
|
||||
if (row[1]) tmp2 = atoi(row[1]);
|
||||
|
||||
@@ -1158,7 +1158,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
safe_delete_array(query);
|
||||
|
||||
row = mysql_fetch_row(result);
|
||||
if (row == NULL) return false;
|
||||
if (row == nullptr) return false;
|
||||
if (row[0]) tmp = atoi(row[0]);
|
||||
if (row[1]) tmp2 = atoi(row[1]);
|
||||
mysql_free_result(result);
|
||||
@@ -1263,7 +1263,7 @@ uint32 NPC::GetMaxDamage(uint8 tlevel)
|
||||
|
||||
void NPC::PickPocket(Client* thief) {
|
||||
|
||||
thief->CheckIncreaseSkill(PICK_POCKETS, NULL, 5);
|
||||
thief->CheckIncreaseSkill(PICK_POCKETS, nullptr, 5);
|
||||
|
||||
//make sure were allowed to targte them:
|
||||
int olevel = GetLevel();
|
||||
@@ -2201,7 +2201,7 @@ void NPC::NPCSlotTexture(uint8 slot, uint16 texture)
|
||||
|
||||
uint32 NPC::GetSwarmOwner()
|
||||
{
|
||||
if(GetSwarmInfo() != NULL)
|
||||
if(GetSwarmInfo() != nullptr)
|
||||
{
|
||||
return GetSwarmInfo()->owner_id;
|
||||
}
|
||||
@@ -2210,7 +2210,7 @@ uint32 NPC::GetSwarmOwner()
|
||||
|
||||
uint32 NPC::GetSwarmTarget()
|
||||
{
|
||||
if(GetSwarmInfo() != NULL)
|
||||
if(GetSwarmInfo() != nullptr)
|
||||
{
|
||||
return GetSwarmInfo()->target;
|
||||
}
|
||||
@@ -2219,7 +2219,7 @@ uint32 NPC::GetSwarmTarget()
|
||||
|
||||
void NPC::SetSwarmTarget(int target_id)
|
||||
{
|
||||
if(GetSwarmInfo() != NULL)
|
||||
if(GetSwarmInfo() != nullptr)
|
||||
{
|
||||
GetSwarmInfo()->target = target_id;
|
||||
}
|
||||
@@ -2282,18 +2282,18 @@ NPC_Emote_Struct* NPC::GetNPCEmote(uint16 emoteid, uint8 event_) {
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
return (NULL);
|
||||
return (nullptr);
|
||||
}
|
||||
|
||||
void NPC::DoNPCEmote(uint8 event_, uint16 emoteid)
|
||||
{
|
||||
if(this == NULL || emoteid == 0)
|
||||
if(this == nullptr || emoteid == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NPC_Emote_Struct* nes = GetNPCEmote(emoteid,event_);
|
||||
if(nes == NULL)
|
||||
if(nes == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2376,7 +2376,7 @@ FACTION_VALUE NPC::GetReverseFactionCon(Mob* iOther) {
|
||||
|
||||
//if we are a pet, use our owner's faction stuff
|
||||
Mob *own = GetOwner();
|
||||
if (own != NULL)
|
||||
if (own != nullptr)
|
||||
return own->GetReverseFactionCon(iOther);
|
||||
|
||||
//make sure iOther is an npc
|
||||
|
||||
+2
-2
@@ -410,12 +410,12 @@ public:
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool DoesQuestItemExist(uint32 itmID, int charges, bool flagItemForDeletion=false) {
|
||||
ItemInst* inst = FindQuestItemByID(itmID,charges,flagItemForDeletion);
|
||||
if ( inst != NULL )
|
||||
if ( inst != nullptr )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@ public:
|
||||
virtual uint16 VarSave();
|
||||
virtual void SetID(uint16 set_id);
|
||||
|
||||
void ClearUser() { user = NULL; }
|
||||
void ClearUser() { user = nullptr; }
|
||||
|
||||
uint32 GetDBID();
|
||||
uint32 GetType();
|
||||
|
||||
+3
-3
@@ -581,7 +581,7 @@ void Parser::SendCommands(const char * event, uint32 npcid, NPC* npcmob, Mob* mo
|
||||
if(mob && mob->IsClient())
|
||||
quest_manager.StartQuest(npcmob, mob->CastToClient());
|
||||
else
|
||||
quest_manager.StartQuest(npcmob, NULL);
|
||||
quest_manager.StartQuest(npcmob, nullptr);
|
||||
while (listIt2 != p->Event.end())
|
||||
{
|
||||
pp = *listIt2;
|
||||
@@ -615,7 +615,7 @@ void Parser::scanformat(char *string, const char *format, char arg[10][1024])
|
||||
|
||||
for(;;)
|
||||
{
|
||||
// increment while they're the same (and not NULL)
|
||||
// increment while they're the same (and not nullptr)
|
||||
while(*format && *string && *format == *string) {
|
||||
format++;
|
||||
string++;
|
||||
@@ -1150,7 +1150,7 @@ printf("GetVar(%s) = '%s'\n", varname.c_str(), p->value.c_str());
|
||||
iterator++;
|
||||
}
|
||||
checkfirst="";
|
||||
checkfirst = "NULL";
|
||||
checkfirst = "nullptr";
|
||||
return checkfirst;
|
||||
}
|
||||
|
||||
|
||||
+29
-29
@@ -45,13 +45,13 @@ float VertexDistanceNoRoot(VERTEX a, VERTEX b)
|
||||
PathManager* PathManager::LoadPathFile(const char* ZoneName)
|
||||
{
|
||||
|
||||
FILE *PathFile = NULL;
|
||||
FILE *PathFile = nullptr;
|
||||
|
||||
char LowerCaseZoneName[64];
|
||||
|
||||
char ZonePathFileName[256];
|
||||
|
||||
PathManager* Ret = NULL;
|
||||
PathManager* Ret = nullptr;
|
||||
|
||||
strn0cpy(LowerCaseZoneName, ZoneName, 64);
|
||||
|
||||
@@ -85,8 +85,8 @@ PathManager* PathManager::LoadPathFile(const char* ZoneName)
|
||||
|
||||
PathManager::PathManager()
|
||||
{
|
||||
PathNodes = NULL;
|
||||
ClosedListFlag = NULL;
|
||||
PathNodes = nullptr;
|
||||
ClosedListFlag = nullptr;
|
||||
Head.PathNodeCount = 0;
|
||||
Head.version = 2;
|
||||
QuickConnectTarget = -1;
|
||||
@@ -397,7 +397,7 @@ list<int> PathManager::FindRoute(VERTEX Start, VERTEX End)
|
||||
{
|
||||
_log(PATHING__DEBUG, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Iterator).id].v, 1.0f, NULL, NULL))
|
||||
if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Iterator).id].v, 1.0f, nullptr, nullptr))
|
||||
{
|
||||
ClosestPathNodeToStart = (*Iterator).id;
|
||||
break;
|
||||
@@ -438,7 +438,7 @@ list<int> PathManager::FindRoute(VERTEX Start, VERTEX End)
|
||||
End.x, End.y, End.z,
|
||||
PathNodes[(*Iterator).id].v.x, PathNodes[(*Iterator).id].v.y, PathNodes[(*Iterator).id].v.z);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(End, PathNodes[(*Iterator).id].v, 1.0f, NULL, NULL))
|
||||
if(!zone->zonemap->LineIntersectsZone(End, PathNodes[(*Iterator).id].v, 1.0f, nullptr, nullptr))
|
||||
{
|
||||
ClosestPathNodeToEnd = (*Iterator).id;
|
||||
break;
|
||||
@@ -478,7 +478,7 @@ list<int> PathManager::FindRoute(VERTEX Start, VERTEX End)
|
||||
if((*Second) < 0)
|
||||
break;
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Second)].v, 1.0f, NULL, NULL)
|
||||
if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Second)].v, 1.0f, nullptr, nullptr)
|
||||
&& zone->pathing->NoHazards(Start, PathNodes[(*Second)].v))
|
||||
{
|
||||
noderoute.erase(First);
|
||||
@@ -511,7 +511,7 @@ list<int> PathManager::FindRoute(VERTEX Start, VERTEX End)
|
||||
if((*Second) < 0)
|
||||
break;
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(End, PathNodes[(*Second)].v, 1.0f, NULL, NULL)
|
||||
if(!zone->zonemap->LineIntersectsZone(End, PathNodes[(*Second)].v, 1.0f, nullptr, nullptr)
|
||||
&& zone->pathing->NoHazards(End, PathNodes[(*Second)].v))
|
||||
{
|
||||
noderoute.erase(First);
|
||||
@@ -772,7 +772,7 @@ VERTEX Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Waypo
|
||||
if((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort))
|
||||
&& (ABS(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold)))
|
||||
{
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, NULL, NULL))
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
@@ -865,7 +865,7 @@ VERTEX Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Waypo
|
||||
if((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort))
|
||||
&& (ABS(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold)))
|
||||
{
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, NULL, NULL))
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
@@ -904,7 +904,7 @@ VERTEX Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Waypo
|
||||
&& (ABS(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold)))
|
||||
{
|
||||
mlog(PATHING__DEBUG, " Checking for short LOS at distance %8.3f.", Distance);
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, NULL, NULL))
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
@@ -1057,7 +1057,7 @@ VERTEX Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Waypo
|
||||
{
|
||||
mlog(PATHING__DEBUG, " Checking for long LOS at distance %8.3f.", Distance);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, NULL, NULL))
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
@@ -1137,7 +1137,7 @@ int PathManager::FindNearestPathNode(VERTEX Position)
|
||||
{
|
||||
_log(PATHING__DEBUG, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(Position, PathNodes[(*Iterator).id].v, 1.0f, NULL, NULL))
|
||||
if(!zone->zonemap->LineIntersectsZone(Position, PathNodes[(*Iterator).id].v, 1.0f, nullptr, nullptr))
|
||||
{
|
||||
ClosestPathNodeToStart = (*Iterator).id;
|
||||
break;
|
||||
@@ -1159,7 +1159,7 @@ bool PathManager::NoHazards(VERTEX From, VERTEX To)
|
||||
//
|
||||
VERTEX MidPoint((From.x + To.x) / 2, (From.y + To.y) / 2, From.z);
|
||||
|
||||
float NewZ = zone->zonemap->FindBestZ(MAP_ROOT_NODE, MidPoint, NULL, NULL);
|
||||
float NewZ = zone->zonemap->FindBestZ(MAP_ROOT_NODE, MidPoint, nullptr, nullptr);
|
||||
|
||||
if(ABS(NewZ - From.z) > RuleR(Pathing, ZDiffThreshold))
|
||||
{
|
||||
@@ -1199,7 +1199,7 @@ bool PathManager::NoHazardsAccurate(VERTEX From, VERTEX To)
|
||||
stepz = (stepz/factor)*step_size;
|
||||
|
||||
VERTEX TestPoint(curx, cury, curz);
|
||||
float NewZ = zone->zonemap->FindBestZ(MAP_ROOT_NODE, TestPoint, NULL, NULL);
|
||||
float NewZ = zone->zonemap->FindBestZ(MAP_ROOT_NODE, TestPoint, nullptr, nullptr);
|
||||
if(ABS(NewZ - last_z) > 5.0)
|
||||
{
|
||||
_log(PATHING__DEBUG, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Best Z %8.3f, Z Change is %8.3f",
|
||||
@@ -1225,7 +1225,7 @@ bool PathManager::NoHazardsAccurate(VERTEX From, VERTEX To)
|
||||
VERTEX hit;
|
||||
TestPointWaterDest.z -= 500;
|
||||
float best_z2 = -999990;
|
||||
if(zone->zonemap->LineIntersectsNode(n, TestPointWater, TestPointWaterDest, &hit, NULL))
|
||||
if(zone->zonemap->LineIntersectsNode(n, TestPointWater, TestPointWaterDest, &hit, nullptr))
|
||||
{
|
||||
best_z2 = hit.z;
|
||||
}
|
||||
@@ -1360,7 +1360,7 @@ PathNode* PathManager::FindPathNodeByCoordinates(float x, float y, float z)
|
||||
if((PathNodes[i].v.x == x) && (PathNodes[i].v.y == y) && (PathNodes[i].v.z == z))
|
||||
return &PathNodes[i];
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int PathManager::GetRandomPathNode()
|
||||
@@ -1743,7 +1743,7 @@ bool PathManager::DeleteNode(int32 id)
|
||||
else
|
||||
{
|
||||
delete[] PathNodes;
|
||||
PathNodes = NULL;
|
||||
PathNodes = nullptr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1777,8 +1777,8 @@ void PathManager::ConnectNodeToNode(Client *c, int32 Node2, int32 teleport, int3
|
||||
|
||||
void PathManager::ConnectNodeToNode(int32 Node1, int32 Node2, int32 teleport, int32 doorid)
|
||||
{
|
||||
PathNode *a = NULL;
|
||||
PathNode *b = NULL;
|
||||
PathNode *a = nullptr;
|
||||
PathNode *b = nullptr;
|
||||
for(uint32 x = 0; x < Head.PathNodeCount; ++x)
|
||||
{
|
||||
if(PathNodes[x].id == Node1)
|
||||
@@ -1795,7 +1795,7 @@ void PathManager::ConnectNodeToNode(int32 Node1, int32 Node2, int32 teleport, in
|
||||
}
|
||||
}
|
||||
|
||||
if(a == NULL || b == NULL)
|
||||
if(a == nullptr || b == nullptr)
|
||||
return;
|
||||
|
||||
bool connect_a_to_b = true;
|
||||
@@ -1867,8 +1867,8 @@ void PathManager::ConnectNode(Client *c, int32 Node2, int32 teleport, int32 door
|
||||
|
||||
void PathManager::ConnectNode(int32 Node1, int32 Node2, int32 teleport, int32 doorid)
|
||||
{
|
||||
PathNode *a = NULL;
|
||||
PathNode *b = NULL;
|
||||
PathNode *a = nullptr;
|
||||
PathNode *b = nullptr;
|
||||
for(uint32 x = 0; x < Head.PathNodeCount; ++x)
|
||||
{
|
||||
if(PathNodes[x].id == Node1)
|
||||
@@ -1885,7 +1885,7 @@ void PathManager::ConnectNode(int32 Node1, int32 Node2, int32 teleport, int32 do
|
||||
}
|
||||
}
|
||||
|
||||
if(a == NULL || b == NULL)
|
||||
if(a == nullptr || b == nullptr)
|
||||
return;
|
||||
|
||||
bool connect_a_to_b = true;
|
||||
@@ -1932,8 +1932,8 @@ void PathManager::DisconnectNodeToNode(Client *c, int32 Node2)
|
||||
|
||||
void PathManager::DisconnectNodeToNode(int32 Node1, int32 Node2)
|
||||
{
|
||||
PathNode *a = NULL;
|
||||
PathNode *b = NULL;
|
||||
PathNode *a = nullptr;
|
||||
PathNode *b = nullptr;
|
||||
for(uint32 x = 0; x < Head.PathNodeCount; ++x)
|
||||
{
|
||||
if(PathNodes[x].id == Node1)
|
||||
@@ -1950,7 +1950,7 @@ void PathManager::DisconnectNodeToNode(int32 Node1, int32 Node2)
|
||||
}
|
||||
}
|
||||
|
||||
if(a == NULL || b == NULL)
|
||||
if(a == nullptr || b == nullptr)
|
||||
return;
|
||||
|
||||
bool disconnect_a_from_b = false;
|
||||
@@ -2018,7 +2018,7 @@ void PathManager::MoveNode(Client *c)
|
||||
if(zone->zonemap)
|
||||
{
|
||||
VERTEX loc(c->GetX(), c->GetY(), c->GetZ());
|
||||
Node->bestz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, loc, NULL, NULL);
|
||||
Node->bestz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, loc, nullptr, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2106,7 +2106,7 @@ bool PathManager::CheckLosFN(VERTEX a, VERTEX b)
|
||||
oloc.z = b.z;
|
||||
|
||||
|
||||
if(zone->zonemap->LineIntersectsZone(myloc, oloc, 1.0f, NULL, NULL))
|
||||
if(zone->zonemap->LineIntersectsZone(myloc, oloc, 1.0f, nullptr, nullptr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+64
-64
@@ -58,8 +58,8 @@ XS(XS_Corpse_GetCharID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCharID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -84,8 +84,8 @@ XS(XS_Corpse_GetDecayTime)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDecayTime();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -108,8 +108,8 @@ XS(XS_Corpse_Lock)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Lock();
|
||||
}
|
||||
@@ -131,8 +131,8 @@ XS(XS_Corpse_UnLock)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->UnLock();
|
||||
}
|
||||
@@ -155,8 +155,8 @@ XS(XS_Corpse_IsLocked)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsLocked();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -180,8 +180,8 @@ XS(XS_Corpse_ResetLooter)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ResetLooter();
|
||||
}
|
||||
@@ -205,8 +205,8 @@ XS(XS_Corpse_GetDBID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDBID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -231,8 +231,8 @@ XS(XS_Corpse_GetOwnerName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetOwnerName();
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
@@ -256,8 +256,8 @@ XS(XS_Corpse_SetDecayTimer)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetDecayTimer(decaytime);
|
||||
}
|
||||
@@ -280,8 +280,8 @@ XS(XS_Corpse_IsEmpty)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsEmpty();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -308,8 +308,8 @@ XS(XS_Corpse_AddItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items < 4)
|
||||
slot = 0;
|
||||
@@ -340,8 +340,8 @@ XS(XS_Corpse_GetWornItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetWornItem(equipSlot);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -365,8 +365,8 @@ XS(XS_Corpse_RemoveItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveItem(lootslot);
|
||||
}
|
||||
@@ -392,8 +392,8 @@ XS(XS_Corpse_SetCash)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetCash(in_copper, in_silver, in_gold, in_platinum);
|
||||
}
|
||||
@@ -415,8 +415,8 @@ XS(XS_Corpse_RemoveCash)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveCash();
|
||||
}
|
||||
@@ -440,8 +440,8 @@ XS(XS_Corpse_CountItems)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->CountItems();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -464,8 +464,8 @@ XS(XS_Corpse_Delete)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Delete();
|
||||
}
|
||||
@@ -489,8 +489,8 @@ XS(XS_Corpse_GetCopper)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCopper();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -515,8 +515,8 @@ XS(XS_Corpse_GetSilver)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSilver();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -541,8 +541,8 @@ XS(XS_Corpse_GetGold)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGold();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -567,8 +567,8 @@ XS(XS_Corpse_GetPlatinum)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetPlatinum();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -593,8 +593,8 @@ XS(XS_Corpse_Summon)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -602,8 +602,8 @@ XS(XS_Corpse_Summon)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "client is not of type Client");
|
||||
if(client == NULL)
|
||||
Perl_croak(aTHX_ "client is NULL, avoiding crash.");
|
||||
if(client == nullptr)
|
||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Summon(client, spell, true);
|
||||
}
|
||||
@@ -627,8 +627,8 @@ XS(XS_Corpse_CastRezz)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(2), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(2)));
|
||||
@@ -636,8 +636,8 @@ XS(XS_Corpse_CastRezz)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "Caster is not of type Mob");
|
||||
if(Caster == NULL)
|
||||
Perl_croak(aTHX_ "Caster is NULL, avoiding crash.");
|
||||
if(Caster == nullptr)
|
||||
Perl_croak(aTHX_ "Caster is nullptr, avoiding crash.");
|
||||
|
||||
THIS->CastRezz(spellid, Caster);
|
||||
}
|
||||
@@ -659,8 +659,8 @@ XS(XS_Corpse_CompleteRezz)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->CompleteRezz();
|
||||
}
|
||||
@@ -684,8 +684,8 @@ XS(XS_Corpse_CanMobLoot)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->CanMobLoot(charid);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -711,8 +711,8 @@ XS(XS_Corpse_AllowMobLoot)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -720,8 +720,8 @@ XS(XS_Corpse_AllowMobLoot)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "them is not of type Mob");
|
||||
if(them == NULL)
|
||||
Perl_croak(aTHX_ "them is NULL, avoiding crash.");
|
||||
if(them == nullptr)
|
||||
Perl_croak(aTHX_ "them is nullptr, avoiding crash.");
|
||||
|
||||
THIS->AllowMobLoot(them, slot);
|
||||
}
|
||||
@@ -744,8 +744,8 @@ XS(XS_Corpse_AddLooter)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -753,8 +753,8 @@ XS(XS_Corpse_AddLooter)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "who is not of type Mob");
|
||||
if(who == NULL)
|
||||
Perl_croak(aTHX_ "who is NULL, avoiding crash.");
|
||||
if(who == nullptr)
|
||||
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
|
||||
|
||||
THIS->AddLooter(who);
|
||||
}
|
||||
@@ -777,8 +777,8 @@ XS(XS_Corpse_IsRezzed)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->Rezzed();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
|
||||
+427
-427
File diff suppressed because it is too large
Load Diff
+55
-55
@@ -57,8 +57,8 @@ XS(XS_Doors_GetDoorDBID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDoorDBID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -83,8 +83,8 @@ XS(XS_Doors_GetDoorID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDoorID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -109,8 +109,8 @@ XS(XS_Doors_GetID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetEntityID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -135,8 +135,8 @@ XS(XS_Doors_GetX)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetX();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -161,8 +161,8 @@ XS(XS_Doors_GetY)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetY();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -187,8 +187,8 @@ XS(XS_Doors_GetZ)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetZ();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -213,8 +213,8 @@ XS(XS_Doors_GetHeading)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetHeading();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -239,8 +239,8 @@ XS(XS_Doors_GetOpenType)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetOpenType();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -265,8 +265,8 @@ XS(XS_Doors_GetLockpick)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetLockpick();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -291,8 +291,8 @@ XS(XS_Doors_GetKeyItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetKeyItem();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -316,8 +316,8 @@ XS(XS_Doors_GetNoKeyring)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->GetNoKeyring();
|
||||
}
|
||||
@@ -341,8 +341,8 @@ XS(XS_Doors_GetIncline)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetIncline();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -367,8 +367,8 @@ XS(XS_Doors_GetSize)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSize();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -394,8 +394,8 @@ XS(XS_Doors_SetOpenType)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetOpenType(type);
|
||||
}
|
||||
@@ -418,8 +418,8 @@ XS(XS_Doors_SetLockpick)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetLockpick(type);
|
||||
}
|
||||
@@ -442,8 +442,8 @@ XS(XS_Doors_SetKeyItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetKeyItem(type);
|
||||
}
|
||||
@@ -466,8 +466,8 @@ XS(XS_Doors_SetNoKeyring)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetNoKeyring(type);
|
||||
}
|
||||
@@ -490,8 +490,8 @@ XS(XS_Doors_SetIncline)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetIncline(type);
|
||||
}
|
||||
@@ -514,8 +514,8 @@ XS(XS_Doors_SetSize)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSize(type);
|
||||
}
|
||||
@@ -540,8 +540,8 @@ XS(XS_Doors_SetLocation)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetLocation(x, y, z);
|
||||
}
|
||||
@@ -564,8 +564,8 @@ XS(XS_Doors_SetX)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetX(pos);
|
||||
}
|
||||
@@ -588,8 +588,8 @@ XS(XS_Doors_SetY)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetY(pos);
|
||||
}
|
||||
@@ -612,8 +612,8 @@ XS(XS_Doors_SetZ)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetZ(pos);
|
||||
}
|
||||
@@ -636,8 +636,8 @@ XS(XS_Doors_SetHeading)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetHeading(heading);
|
||||
}
|
||||
@@ -652,7 +652,7 @@ XS(XS_Doors_SetModelName)
|
||||
Perl_croak(aTHX_ "Usage: Doors::SetModelName(THIS, name)");
|
||||
{
|
||||
Doors * THIS;
|
||||
char * name = NULL;
|
||||
char * name = nullptr;
|
||||
|
||||
if (sv_derived_from(ST(0), "Doors")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
@@ -660,8 +660,8 @@ XS(XS_Doors_SetModelName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items > 1) { name = (char *)SvPV_nolen(ST(1)); }
|
||||
|
||||
@@ -686,8 +686,8 @@ XS(XS_Doors_GetModelName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDoorName();
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
@@ -710,8 +710,8 @@ XS(XS_Doors_CreateDatabaseEntry)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Doors");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->CreateDatabaseEntry();
|
||||
}
|
||||
|
||||
+174
-174
@@ -59,8 +59,8 @@ XS(XS_EntityList_GetMobID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMobID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -86,8 +86,8 @@ XS(XS_EntityList_GetMob)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMob(name);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -113,8 +113,8 @@ XS(XS_EntityList_GetMobByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMob(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -140,8 +140,8 @@ XS(XS_EntityList_GetMobByNpcTypeID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMobByNpcTypeID(get_id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -167,8 +167,8 @@ XS(XS_EntityList_GetNPCByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetNPCByID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -194,8 +194,8 @@ XS(XS_EntityList_GetNPCByNPCTypeID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetNPCByNPCTypeID(npc_id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -221,8 +221,8 @@ XS(XS_EntityList_GetClientByName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetClientByName(name);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -248,8 +248,8 @@ XS(XS_EntityList_GetClientByAccID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetClientByAccID(accid);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -275,8 +275,8 @@ XS(XS_EntityList_GetClientByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetClientByID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -302,8 +302,8 @@ XS(XS_EntityList_GetClientByCharID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetClientByCharID(iCharID);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -329,8 +329,8 @@ XS(XS_EntityList_GetClientByWID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetClientByWID(iWID);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -356,8 +356,8 @@ XS(XS_EntityList_GetObjectByDBID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetObjectByDBID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -383,8 +383,8 @@ XS(XS_EntityList_GetObjectByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetObjectByID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -410,8 +410,8 @@ XS(XS_EntityList_GetDoorsByDBID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDoorsByDBID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -437,8 +437,8 @@ XS(XS_EntityList_GetDoorsByDoorID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDoorsByDoorID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -464,8 +464,8 @@ XS(XS_EntityList_GetDoorsByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDoorsByID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -491,8 +491,8 @@ XS(XS_EntityList_FindDoor)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->FindDoor(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -518,8 +518,8 @@ XS(XS_EntityList_GetGroupByMob)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -527,8 +527,8 @@ XS(XS_EntityList_GetGroupByMob)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "mob is not of type Mob");
|
||||
if(mob == NULL)
|
||||
Perl_croak(aTHX_ "mob is NULL, avoiding crash.");
|
||||
if(mob == nullptr)
|
||||
Perl_croak(aTHX_ "mob is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGroupByMob(mob);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -554,8 +554,8 @@ XS(XS_EntityList_GetGroupByClient)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -563,8 +563,8 @@ XS(XS_EntityList_GetGroupByClient)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "client is not of type Client");
|
||||
if(client == NULL)
|
||||
Perl_croak(aTHX_ "client is NULL, avoiding crash.");
|
||||
if(client == nullptr)
|
||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGroupByClient(client);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -590,8 +590,8 @@ XS(XS_EntityList_GetGroupByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGroupByID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -617,8 +617,8 @@ XS(XS_EntityList_GetGroupByLeaderName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGroupByLeaderName(leader);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -644,8 +644,8 @@ XS(XS_EntityList_GetRaidByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetRaidByID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -671,8 +671,8 @@ XS(XS_EntityList_GetRaidByClient)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -680,8 +680,8 @@ XS(XS_EntityList_GetRaidByClient)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "client is not of type Client");
|
||||
if(client == NULL)
|
||||
Perl_croak(aTHX_ "client is NULL, avoiding crash.");
|
||||
if(client == nullptr)
|
||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetRaidByClient(client);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -707,8 +707,8 @@ XS(XS_EntityList_GetCorpseByOwner)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -716,8 +716,8 @@ XS(XS_EntityList_GetCorpseByOwner)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "client is not of type Client");
|
||||
if(client == NULL)
|
||||
Perl_croak(aTHX_ "client is NULL, avoiding crash.");
|
||||
if(client == nullptr)
|
||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCorpseByOwner(client);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -743,8 +743,8 @@ XS(XS_EntityList_GetCorpseByID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCorpseByID(id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -770,8 +770,8 @@ XS(XS_EntityList_GetCorpseByName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCorpseByName(name);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -795,8 +795,8 @@ XS(XS_EntityList_ClearClientPetitionQueue)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ClearClientPetitionQueue();
|
||||
}
|
||||
@@ -820,8 +820,8 @@ XS(XS_EntityList_CanAddHateForMob)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -829,8 +829,8 @@ XS(XS_EntityList_CanAddHateForMob)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "p is not of type Mob");
|
||||
if(p == NULL)
|
||||
Perl_croak(aTHX_ "p is NULL, avoiding crash.");
|
||||
if(p == nullptr)
|
||||
Perl_croak(aTHX_ "p is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->CanAddHateForMob(p);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -854,8 +854,8 @@ XS(XS_EntityList_Clear)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Clear();
|
||||
}
|
||||
@@ -879,8 +879,8 @@ XS(XS_EntityList_RemoveMob)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveMob(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -906,8 +906,8 @@ XS(XS_EntityList_RemoveClient)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveClient(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -933,8 +933,8 @@ XS(XS_EntityList_RemoveNPC)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveNPC(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -960,8 +960,8 @@ XS(XS_EntityList_RemoveGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveGroup(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -987,8 +987,8 @@ XS(XS_EntityList_RemoveCorpse)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveCorpse(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -1014,8 +1014,8 @@ XS(XS_EntityList_RemoveDoor)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveDoor(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -1041,8 +1041,8 @@ XS(XS_EntityList_RemoveTrap)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveTrap(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -1068,8 +1068,8 @@ XS(XS_EntityList_RemoveObject)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RemoveObject(delete_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -1093,8 +1093,8 @@ XS(XS_EntityList_RemoveAllMobs)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllMobs();
|
||||
}
|
||||
@@ -1116,8 +1116,8 @@ XS(XS_EntityList_RemoveAllClients)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllClients();
|
||||
}
|
||||
@@ -1139,8 +1139,8 @@ XS(XS_EntityList_RemoveAllNPCs)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllNPCs();
|
||||
}
|
||||
@@ -1162,8 +1162,8 @@ XS(XS_EntityList_RemoveAllGroups)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllGroups();
|
||||
}
|
||||
@@ -1185,8 +1185,8 @@ XS(XS_EntityList_RemoveAllCorpses)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllCorpses();
|
||||
}
|
||||
@@ -1208,8 +1208,8 @@ XS(XS_EntityList_RemoveAllDoors)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllDoors();
|
||||
}
|
||||
@@ -1231,8 +1231,8 @@ XS(XS_EntityList_RemoveAllTraps)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllTraps();
|
||||
}
|
||||
@@ -1254,8 +1254,8 @@ XS(XS_EntityList_RemoveAllObjects)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveAllObjects();
|
||||
}
|
||||
@@ -1280,8 +1280,8 @@ XS(XS_EntityList_Message)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Message(to_guilddbid, type, message);
|
||||
}
|
||||
@@ -1307,8 +1307,8 @@ XS(XS_EntityList_MessageStatus)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->MessageStatus(to_guilddbid, to_minstatus, type, message);
|
||||
}
|
||||
@@ -1335,8 +1335,8 @@ XS(XS_EntityList_MessageClose)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1344,8 +1344,8 @@ XS(XS_EntityList_MessageClose)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||
if(sender == NULL)
|
||||
Perl_croak(aTHX_ "sender is NULL, avoiding crash.");
|
||||
if(sender == nullptr)
|
||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||
|
||||
THIS->MessageClose(sender, skipsender, dist, type, message);
|
||||
}
|
||||
@@ -1368,8 +1368,8 @@ XS(XS_EntityList_RemoveFromTargets)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1377,8 +1377,8 @@ XS(XS_EntityList_RemoveFromTargets)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "mob is not of type Mob");
|
||||
if(mob == NULL)
|
||||
Perl_croak(aTHX_ "mob is NULL, avoiding crash.");
|
||||
if(mob == nullptr)
|
||||
Perl_croak(aTHX_ "mob is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveFromTargets(mob);
|
||||
}
|
||||
@@ -1402,8 +1402,8 @@ XS(XS_EntityList_ReplaceWithTarget)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1411,8 +1411,8 @@ XS(XS_EntityList_ReplaceWithTarget)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "pOldMob is not of type Mob");
|
||||
if(pOldMob == NULL)
|
||||
Perl_croak(aTHX_ "pOldMob is NULL, avoiding crash.");
|
||||
if(pOldMob == nullptr)
|
||||
Perl_croak(aTHX_ "pOldMob is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(2), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(2)));
|
||||
@@ -1420,8 +1420,8 @@ XS(XS_EntityList_ReplaceWithTarget)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "pNewTarget is not of type Mob");
|
||||
if(pNewTarget == NULL)
|
||||
Perl_croak(aTHX_ "pNewTarget is NULL, avoiding crash.");
|
||||
if(pNewTarget == nullptr)
|
||||
Perl_croak(aTHX_ "pNewTarget is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ReplaceWithTarget(pOldMob, pNewTarget);
|
||||
}
|
||||
@@ -1444,8 +1444,8 @@ XS(XS_EntityList_OpenDoorsNear)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "NPC")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1453,8 +1453,8 @@ XS(XS_EntityList_OpenDoorsNear)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "opener is not of type NPC");
|
||||
if(opener == NULL)
|
||||
Perl_croak(aTHX_ "opener is NULL, avoiding crash.");
|
||||
if(opener == nullptr)
|
||||
Perl_croak(aTHX_ "opener is nullptr, avoiding crash.");
|
||||
|
||||
THIS->OpenDoorsNear(opener);
|
||||
}
|
||||
@@ -1479,8 +1479,8 @@ XS(XS_EntityList_MakeNameUnique)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->MakeNameUnique(name);
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
@@ -1522,8 +1522,8 @@ XS(XS_EntityList_SignalMobsByNPCID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SignalMobsByNPCID(npc_type, signal_id);
|
||||
}
|
||||
@@ -1546,8 +1546,8 @@ XS(XS_EntityList_RemoveEntity)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveEntity(id);
|
||||
}
|
||||
@@ -1571,8 +1571,8 @@ XS(XS_EntityList_DeleteNPCCorpses)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->DeleteNPCCorpses();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -1597,8 +1597,8 @@ XS(XS_EntityList_DeletePlayerCorpses)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->DeletePlayerCorpses();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -1622,8 +1622,8 @@ XS(XS_EntityList_HalveAggro)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1631,8 +1631,8 @@ XS(XS_EntityList_HalveAggro)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "who is not of type Mob");
|
||||
if(who == NULL)
|
||||
Perl_croak(aTHX_ "who is NULL, avoiding crash.");
|
||||
if(who == nullptr)
|
||||
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
|
||||
|
||||
THIS->HalveAggro(who);
|
||||
}
|
||||
@@ -1655,8 +1655,8 @@ XS(XS_EntityList_DoubleAggro)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1664,8 +1664,8 @@ XS(XS_EntityList_DoubleAggro)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "who is not of type Mob");
|
||||
if(who == NULL)
|
||||
Perl_croak(aTHX_ "who is NULL, avoiding crash.");
|
||||
if(who == nullptr)
|
||||
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
|
||||
|
||||
THIS->DoubleAggro(who);
|
||||
}
|
||||
@@ -1688,8 +1688,8 @@ XS(XS_EntityList_ClearFeignAggro)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1697,8 +1697,8 @@ XS(XS_EntityList_ClearFeignAggro)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "targ is not of type Mob");
|
||||
if(targ == NULL)
|
||||
Perl_croak(aTHX_ "targ is NULL, avoiding crash.");
|
||||
if(targ == nullptr)
|
||||
Perl_croak(aTHX_ "targ is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ClearFeignAggro(targ);
|
||||
}
|
||||
@@ -1722,8 +1722,8 @@ XS(XS_EntityList_Fighting)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1731,8 +1731,8 @@ XS(XS_EntityList_Fighting)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "targ is not of type Mob");
|
||||
if(targ == NULL)
|
||||
Perl_croak(aTHX_ "targ is NULL, avoiding crash.");
|
||||
if(targ == nullptr)
|
||||
Perl_croak(aTHX_ "targ is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->Fighting(targ);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -1758,8 +1758,8 @@ XS(XS_EntityList_RemoveFromHateLists)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1767,8 +1767,8 @@ XS(XS_EntityList_RemoveFromHateLists)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "mob is not of type Mob");
|
||||
if(mob == NULL)
|
||||
Perl_croak(aTHX_ "mob is NULL, avoiding crash.");
|
||||
if(mob == nullptr)
|
||||
Perl_croak(aTHX_ "mob is nullptr, avoiding crash.");
|
||||
|
||||
if (items < 3)
|
||||
settoone = false;
|
||||
@@ -1800,8 +1800,8 @@ XS(XS_EntityList_MessageGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1809,8 +1809,8 @@ XS(XS_EntityList_MessageGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||
if(sender == NULL)
|
||||
Perl_croak(aTHX_ "sender is NULL, avoiding crash.");
|
||||
if(sender == nullptr)
|
||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||
|
||||
THIS->MessageGroup(sender, skipclose, type, message);
|
||||
}
|
||||
@@ -1822,10 +1822,10 @@ XS(XS_EntityList_GetRandomClient)
|
||||
{
|
||||
dXSARGS;
|
||||
if ((items < 5) || (items > 6))
|
||||
Perl_croak(aTHX_ "Usage: EntityList::GetRandomClient(THIS, x, y, z, distance, excludeclient = NULL)");
|
||||
Perl_croak(aTHX_ "Usage: EntityList::GetRandomClient(THIS, x, y, z, distance, excludeclient = nullptr)");
|
||||
{
|
||||
EntityList *THIS;
|
||||
Client *RETVAL, *c = NULL;
|
||||
Client *RETVAL, *c = nullptr;
|
||||
float x = (float)SvNV(ST(1));
|
||||
float y = (float)SvNV(ST(2));
|
||||
float z = (float)SvNV(ST(3));
|
||||
@@ -1838,8 +1838,8 @@ XS(XS_EntityList_GetRandomClient)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if(items == 6)
|
||||
{
|
||||
@@ -1872,8 +1872,8 @@ XS(XS_EntityList_GetMobList)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
std::list<Mob*> mob_list;
|
||||
entity_list.GetMobList(mob_list);
|
||||
@@ -1909,8 +1909,8 @@ XS(XS_EntityList_GetClientList)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
std::list<Client*> client_list;
|
||||
entity_list.GetClientList(client_list);
|
||||
@@ -1946,8 +1946,8 @@ XS(XS_EntityList_GetNPCList)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
std::list<NPC*> npc_list;
|
||||
entity_list.GetNPCList(npc_list);
|
||||
@@ -1983,8 +1983,8 @@ XS(XS_EntityList_GetCorpseList)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
std::list<Corpse*> corpse_list;
|
||||
entity_list.GetCorpseList(corpse_list);
|
||||
@@ -2020,8 +2020,8 @@ XS(XS_EntityList_GetObjectList)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
std::list<Object*> object_list;
|
||||
entity_list.GetObjectList(object_list);
|
||||
@@ -2057,8 +2057,8 @@ XS(XS_EntityList_GetDoorsList)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
std::list<Doors*> door_list;
|
||||
entity_list.GetDoorsList(door_list);
|
||||
@@ -2094,8 +2094,8 @@ XS(XS_EntityList_SignalAllClients)
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EntityList");
|
||||
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
entity_list.SignalAllClients(data);
|
||||
}
|
||||
|
||||
+59
-59
@@ -56,8 +56,8 @@ XS(XS_Group_DisbandGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->DisbandGroup();
|
||||
}
|
||||
@@ -81,8 +81,8 @@ XS(XS_Group_IsGroupMember)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -90,8 +90,8 @@ XS(XS_Group_IsGroupMember)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "client is not of type Mob");
|
||||
if(client == NULL)
|
||||
Perl_croak(aTHX_ "client is NULL, avoiding crash.");
|
||||
if(client == nullptr)
|
||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsGroupMember(client);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -117,8 +117,8 @@ XS(XS_Group_CastGroupSpell)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -126,8 +126,8 @@ XS(XS_Group_CastGroupSpell)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "caster is not of type Mob");
|
||||
if(caster == NULL)
|
||||
Perl_croak(aTHX_ "caster is NULL, avoiding crash.");
|
||||
if(caster == nullptr)
|
||||
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
|
||||
|
||||
THIS->CastGroupSpell(caster, spellid);
|
||||
}
|
||||
@@ -151,8 +151,8 @@ XS(XS_Group_SplitExp)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(2), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(2)));
|
||||
@@ -160,8 +160,8 @@ XS(XS_Group_SplitExp)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "other is not of type Mob");
|
||||
if(other == NULL)
|
||||
Perl_croak(aTHX_ "other is NULL, avoiding crash.");
|
||||
if(other == nullptr)
|
||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SplitExp(exp, other);
|
||||
}
|
||||
@@ -186,8 +186,8 @@ XS(XS_Group_GroupMessage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -195,8 +195,8 @@ XS(XS_Group_GroupMessage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||
if(sender == NULL)
|
||||
Perl_croak(aTHX_ "sender is NULL, avoiding crash.");
|
||||
if(sender == nullptr)
|
||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||
|
||||
if (items == 4) {
|
||||
language = (uint8)SvUV(ST(2));
|
||||
@@ -231,8 +231,8 @@ XS(XS_Group_GetTotalGroupDamage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -240,8 +240,8 @@ XS(XS_Group_GetTotalGroupDamage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "other is not of type Mob");
|
||||
if(other == NULL)
|
||||
Perl_croak(aTHX_ "other is NULL, avoiding crash.");
|
||||
if(other == nullptr)
|
||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetTotalGroupDamage(other);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -268,8 +268,8 @@ XS(XS_Group_SplitMoney)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SplitMoney(copper, silver, gold, platinum);
|
||||
}
|
||||
@@ -292,8 +292,8 @@ XS(XS_Group_SetLeader)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -301,8 +301,8 @@ XS(XS_Group_SetLeader)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "newleader is not of type Mob");
|
||||
if(newleader == NULL)
|
||||
Perl_croak(aTHX_ "newleader is NULL, avoiding crash.");
|
||||
if(newleader == nullptr)
|
||||
Perl_croak(aTHX_ "newleader is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetLeader(newleader);
|
||||
}
|
||||
@@ -325,8 +325,8 @@ XS(XS_Group_GetLeader)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetLeader();
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -352,8 +352,8 @@ XS(XS_Group_GetLeaderName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetLeaderName();
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
@@ -377,8 +377,8 @@ XS(XS_Group_SendHPPacketsTo)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -386,8 +386,8 @@ XS(XS_Group_SendHPPacketsTo)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "newmember is not of type Mob");
|
||||
if(newmember == NULL)
|
||||
Perl_croak(aTHX_ "newmember is NULL, avoiding crash.");
|
||||
if(newmember == nullptr)
|
||||
Perl_croak(aTHX_ "newmember is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SendHPPacketsTo(newmember);
|
||||
}
|
||||
@@ -410,8 +410,8 @@ XS(XS_Group_SendHPPacketsFrom)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -419,8 +419,8 @@ XS(XS_Group_SendHPPacketsFrom)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "newmember is not of type Mob");
|
||||
if(newmember == NULL)
|
||||
Perl_croak(aTHX_ "newmember is NULL, avoiding crash.");
|
||||
if(newmember == nullptr)
|
||||
Perl_croak(aTHX_ "newmember is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SendHPPacketsFrom(newmember);
|
||||
}
|
||||
@@ -444,8 +444,8 @@ XS(XS_Group_IsLeader)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -453,8 +453,8 @@ XS(XS_Group_IsLeader)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "leadertest is not of type Mob");
|
||||
if(leadertest == NULL)
|
||||
Perl_croak(aTHX_ "leadertest is NULL, avoiding crash.");
|
||||
if(leadertest == nullptr)
|
||||
Perl_croak(aTHX_ "leadertest is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsLeader(leadertest);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -480,8 +480,8 @@ XS(XS_Group_GroupCount)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GroupCount();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -506,8 +506,8 @@ XS(XS_Group_GetHighestLevel)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetHighestLevel();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -536,8 +536,8 @@ XS(XS_Group_TeleportGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -545,8 +545,8 @@ XS(XS_Group_TeleportGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||
if(sender == NULL)
|
||||
Perl_croak(aTHX_ "sender is NULL, avoiding crash.");
|
||||
if(sender == nullptr)
|
||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||
|
||||
THIS->TeleportGroup(sender, zoneID, 0, x, y, z, heading);
|
||||
}
|
||||
@@ -570,8 +570,8 @@ XS(XS_Group_GetID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -588,7 +588,7 @@ XS(XS_Group_GetMember)
|
||||
{
|
||||
Group * THIS;
|
||||
Mob* member;
|
||||
Client* RETVAL = NULL;
|
||||
Client* RETVAL = nullptr;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Group")) {
|
||||
@@ -597,15 +597,15 @@ XS(XS_Group_GetMember)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Group");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
int index = (int)SvUV(ST(1));
|
||||
if (index < 0 || index > 5)
|
||||
RETVAL = NULL;
|
||||
RETVAL = nullptr;
|
||||
else {
|
||||
member = THIS->members[index];
|
||||
if (member != NULL)
|
||||
if (member != nullptr)
|
||||
RETVAL = member->CastToClient();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ XS(XS_HateEntry_GetEnt)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->ent;
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -76,8 +76,8 @@ XS(XS_HateEntry_GetHate)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->hate;
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -102,8 +102,8 @@ XS(XS_HateEntry_GetDamage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type tHateEntry");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->damage;
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -138,4 +138,4 @@ XS(boot_HateEntry)
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
#endif //EMBPERL_XS_CLASSES
|
||||
#endif //EMBPERL_XS_CLASSES
|
||||
|
||||
+658
-658
File diff suppressed because it is too large
Load Diff
+164
-164
@@ -59,8 +59,8 @@ XS(XS_NPC_SignalNPC)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SignalNPC(_signal_id);
|
||||
}
|
||||
@@ -85,8 +85,8 @@ XS(XS_NPC_CheckNPCFactionAlly)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->CheckNPCFactionAlly(other_faction);
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -112,8 +112,8 @@ XS(XS_NPC_AddItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items > 2)
|
||||
charges = (uint16)SvUV(ST(2));
|
||||
@@ -140,8 +140,8 @@ XS(XS_NPC_AddLootTable)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
uint32 loottable_id = 0;
|
||||
|
||||
@@ -176,8 +176,8 @@ XS(XS_NPC_RemoveItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items < 3)
|
||||
quantity = 0;
|
||||
@@ -211,8 +211,8 @@ XS(XS_NPC_ClearItemList)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ClearItemList();
|
||||
}
|
||||
@@ -238,8 +238,8 @@ XS(XS_NPC_AddCash)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->AddCash(in_copper, in_silver, in_gold, in_platinum);
|
||||
}
|
||||
@@ -261,8 +261,8 @@ XS(XS_NPC_RemoveCash)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveCash();
|
||||
}
|
||||
@@ -286,8 +286,8 @@ XS(XS_NPC_CountLoot)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->CountLoot();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -312,8 +312,8 @@ XS(XS_NPC_GetLoottableID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetLoottableID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -338,8 +338,8 @@ XS(XS_NPC_GetCopper)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCopper();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -364,8 +364,8 @@ XS(XS_NPC_GetSilver)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSilver();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -390,8 +390,8 @@ XS(XS_NPC_GetGold)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGold();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -416,8 +416,8 @@ XS(XS_NPC_GetPlatinum)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetPlatinum();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -441,8 +441,8 @@ XS(XS_NPC_SetCopper)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetCopper(amt);
|
||||
}
|
||||
@@ -465,8 +465,8 @@ XS(XS_NPC_SetSilver)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSilver(amt);
|
||||
}
|
||||
@@ -489,8 +489,8 @@ XS(XS_NPC_SetGold)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetGold(amt);
|
||||
}
|
||||
@@ -513,8 +513,8 @@ XS(XS_NPC_SetPlatinum)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetPlatinum(amt);
|
||||
}
|
||||
@@ -537,8 +537,8 @@ XS(XS_NPC_SetGrid)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetGrid(grid_);
|
||||
}
|
||||
@@ -561,8 +561,8 @@ XS(XS_NPC_SetSaveWaypoint)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSaveWaypoint(waypoint);
|
||||
}
|
||||
@@ -585,8 +585,8 @@ XS(XS_NPC_SetSp2)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSp2(sg2);
|
||||
}
|
||||
@@ -610,8 +610,8 @@ XS(XS_NPC_GetWaypointMax)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetWaypointMax();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -636,8 +636,8 @@ XS(XS_NPC_GetGrid)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGrid();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -662,8 +662,8 @@ XS(XS_NPC_GetSp2)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSp2();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -688,8 +688,8 @@ XS(XS_NPC_GetNPCFactionID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetNPCFactionID();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -714,8 +714,8 @@ XS(XS_NPC_GetPrimaryFaction)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetPrimaryFaction();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -741,8 +741,8 @@ XS(XS_NPC_GetNPCHate)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -750,8 +750,8 @@ XS(XS_NPC_GetNPCHate)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "in_ent is not of type Mob");
|
||||
if(in_ent == NULL)
|
||||
Perl_croak(aTHX_ "in_ent is NULL, avoiding crash.");
|
||||
if(in_ent == nullptr)
|
||||
Perl_croak(aTHX_ "in_ent is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetNPCHate(in_ent);
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -776,8 +776,8 @@ XS(XS_NPC_IsOnHatelist)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -785,8 +785,8 @@ XS(XS_NPC_IsOnHatelist)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "p is not of type Mob");
|
||||
if(p == NULL)
|
||||
Perl_croak(aTHX_ "p is NULL, avoiding crash.");
|
||||
if(p == nullptr)
|
||||
Perl_croak(aTHX_ "p is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsOnHatelist(p);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -811,8 +811,8 @@ XS(XS_NPC_SetNPCFactionID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetNPCFactionID(in);
|
||||
}
|
||||
@@ -836,8 +836,8 @@ XS(XS_NPC_GetMaxDMG)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMaxDMG();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -862,8 +862,8 @@ XS(XS_NPC_GetMinDMG)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMinDMG();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -888,8 +888,8 @@ XS(XS_NPC_IsAnimal)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsAnimal();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -915,8 +915,8 @@ XS(XS_NPC_GetPetSpellID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetPetSpellID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -940,8 +940,8 @@ XS(XS_NPC_SetPetSpellID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetPetSpellID(amt);
|
||||
}
|
||||
@@ -966,8 +966,8 @@ XS(XS_NPC_GetMaxDamage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMaxDamage(tlevel);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -991,8 +991,8 @@ XS(XS_NPC_SetTaunting)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetTaunting(tog);
|
||||
}
|
||||
@@ -1015,8 +1015,8 @@ XS(XS_NPC_PickPocket)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1024,8 +1024,8 @@ XS(XS_NPC_PickPocket)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "thief is not of type Client");
|
||||
if(thief == NULL)
|
||||
Perl_croak(aTHX_ "thief is NULL, avoiding crash.");
|
||||
if(thief == nullptr)
|
||||
Perl_croak(aTHX_ "thief is nullptr, avoiding crash.");
|
||||
|
||||
THIS->PickPocket(thief);
|
||||
}
|
||||
@@ -1048,8 +1048,8 @@ XS(XS_NPC_StartSwarmTimer)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->StartSwarmTimer(duration);
|
||||
}
|
||||
@@ -1072,8 +1072,8 @@ XS(XS_NPC_DoClassAttacks)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1081,8 +1081,8 @@ XS(XS_NPC_DoClassAttacks)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "target is not of type Mob");
|
||||
if(target == NULL)
|
||||
Perl_croak(aTHX_ "target is NULL, avoiding crash.");
|
||||
if(target == nullptr)
|
||||
Perl_croak(aTHX_ "target is nullptr, avoiding crash.");
|
||||
|
||||
THIS->DoClassAttacks(target);
|
||||
}
|
||||
@@ -1106,8 +1106,8 @@ XS(XS_NPC_GetMaxWp)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetMaxWp();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -1131,8 +1131,8 @@ XS(XS_NPC_DisplayWaypointInfo)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -1140,8 +1140,8 @@ XS(XS_NPC_DisplayWaypointInfo)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "to is not of type Client");
|
||||
if(to == NULL)
|
||||
Perl_croak(aTHX_ "to is NULL, avoiding crash.");
|
||||
if(to == nullptr)
|
||||
Perl_croak(aTHX_ "to is nullptr, avoiding crash.");
|
||||
|
||||
THIS->DisplayWaypointInfo(to);
|
||||
}
|
||||
@@ -1163,8 +1163,8 @@ XS(XS_NPC_CalculateNewWaypoint)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->CalculateNewWaypoint();
|
||||
}
|
||||
@@ -1187,8 +1187,8 @@ XS(XS_NPC_AssignWaypoints)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->AssignWaypoints(grid);
|
||||
}
|
||||
@@ -1210,8 +1210,8 @@ XS(XS_NPC_SetWaypointPause)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetWaypointPause();
|
||||
}
|
||||
@@ -1234,8 +1234,8 @@ XS(XS_NPC_UpdateWaypoint)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->UpdateWaypoint(wp_index);
|
||||
}
|
||||
@@ -1257,8 +1257,8 @@ XS(XS_NPC_StopWandering)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->StopWandering();
|
||||
}
|
||||
@@ -1280,8 +1280,8 @@ XS(XS_NPC_ResumeWandering)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ResumeWandering();
|
||||
}
|
||||
@@ -1304,8 +1304,8 @@ XS(XS_NPC_PauseWandering)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->PauseWandering(pausetime);
|
||||
}
|
||||
@@ -1342,8 +1342,8 @@ XS(XS_NPC_MoveTo)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->MoveTo(mtx, mty, mtz, mth, saveguard);
|
||||
}
|
||||
@@ -1365,8 +1365,8 @@ XS(XS_NPC_NextGuardPosition)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->NextGuardPosition();
|
||||
}
|
||||
@@ -1389,8 +1389,8 @@ XS(XS_NPC_SaveGuardSpot)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items < 2)
|
||||
iClearGuardSpot = false;
|
||||
@@ -1419,8 +1419,8 @@ XS(XS_NPC_IsGuarding)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsGuarding();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -1450,8 +1450,8 @@ XS(XS_NPC_AI_SetRoambox)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items < 7)
|
||||
iDelay = 2500;
|
||||
@@ -1481,8 +1481,8 @@ XS(XS_NPC_GetNPCSpellsID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetNPCSpellsID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -1507,8 +1507,8 @@ XS(XS_NPC_GetSpawnPointID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSpawnPointID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -1533,8 +1533,8 @@ XS(XS_NPC_GetSpawnPointX)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
RETVAL = THIS->GetSpawnPointX();
|
||||
@@ -1560,8 +1560,8 @@ XS(XS_NPC_GetSpawnPointY)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
RETVAL = THIS->GetSpawnPointY();
|
||||
@@ -1587,8 +1587,8 @@ XS(XS_NPC_GetSpawnPointZ)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
RETVAL = THIS->GetSpawnPointZ();
|
||||
@@ -1614,8 +1614,8 @@ XS(XS_NPC_GetSpawnPointH)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
RETVAL = THIS->GetSpawnPointH();
|
||||
@@ -1641,8 +1641,8 @@ XS(XS_NPC_GetGuardPointX)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
RETVAL = THIS->GetGuardPointX();
|
||||
@@ -1668,8 +1668,8 @@ XS(XS_NPC_GetGuardPointY)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
RETVAL = THIS->GetGuardPointY();
|
||||
@@ -1695,8 +1695,8 @@ XS(XS_NPC_GetGuardPointZ)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
|
||||
RETVAL = THIS->GetGuardPointZ();
|
||||
@@ -1721,8 +1721,8 @@ XS(XS_NPC_SetPrimSkill)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetPrimSkill(skill_id);
|
||||
}
|
||||
@@ -1745,8 +1745,8 @@ XS(XS_NPC_SetSecSkill)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSecSkill(skill_id);
|
||||
}
|
||||
@@ -1770,8 +1770,8 @@ XS(XS_NPC_GetPrimSkill)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetPrimSkill();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -1796,8 +1796,8 @@ XS(XS_NPC_GetSecSkill)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSecSkill();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -1822,8 +1822,8 @@ XS(XS_NPC_GetSwarmOwner)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSwarmOwner();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -1848,8 +1848,8 @@ XS(XS_NPC_GetSwarmTarget)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSwarmTarget();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -1873,8 +1873,8 @@ XS(XS_NPC_SetSwarmTarget)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSwarmTarget(target_id);
|
||||
}
|
||||
@@ -1898,8 +1898,8 @@ XS(XS_NPC_ModifyNPCStat)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ModifyNPCStat(identifier, newValue);
|
||||
}
|
||||
@@ -1927,8 +1927,8 @@ XS(XS_NPC_AddSpellToNPCList)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust);
|
||||
}
|
||||
@@ -1951,8 +1951,8 @@ XS(XS_NPC_RemoveSpellFromNPCList)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->RemoveSpellFromNPCList(spell_id);
|
||||
}
|
||||
@@ -1975,8 +1975,8 @@ XS(XS_NPC_SetSpellFocusDMG)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSpellFocusDMG(NewSpellFocusDMG);
|
||||
}
|
||||
@@ -1999,8 +1999,8 @@ XS(XS_NPC_SetSpellFocusHeal)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetSpellFocusHeal(NewSpellFocusHeal);
|
||||
}
|
||||
@@ -2024,8 +2024,8 @@ XS(XS_NPC_GetSlowMitigation)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSlowMitigation();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -2050,8 +2050,8 @@ XS(XS_NPC_GetAttackSpeed)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetAttackSpeed();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -2076,8 +2076,8 @@ XS(XS_NPC_GetAccuracyRating)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type NPC");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetAccuracyRating();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
|
||||
+69
-69
@@ -56,8 +56,8 @@ XS(XS_Object_IsGroundSpawn)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsGroundSpawn();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -83,8 +83,8 @@ XS(XS_Object_Close)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Close();
|
||||
}
|
||||
@@ -108,8 +108,8 @@ XS(XS_Object_Delete)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items < 2)
|
||||
reset_state = false;
|
||||
@@ -136,8 +136,8 @@ XS(XS_Object_StartDecay)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->StartDecay();
|
||||
}
|
||||
@@ -161,8 +161,8 @@ XS(XS_Object_DeleteItem)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->DeleteItem(index);
|
||||
}
|
||||
@@ -185,8 +185,8 @@ XS(XS_Object_IsObject)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsObject();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -212,8 +212,8 @@ XS(XS_Object_Save)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->Save();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -239,8 +239,8 @@ XS(XS_Object_SetID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetID(set_id);
|
||||
}
|
||||
@@ -263,8 +263,8 @@ XS(XS_Object_ClearUser)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->ClearUser();
|
||||
}
|
||||
@@ -289,8 +289,8 @@ XS(XS_Object_GetDBID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDBID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -315,8 +315,8 @@ XS(XS_Object_GetID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -341,8 +341,8 @@ XS(XS_Object_GetX)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetX();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -367,8 +367,8 @@ XS(XS_Object_GetY)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetY();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -393,8 +393,8 @@ XS(XS_Object_GetZ)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetZ();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -419,8 +419,8 @@ XS(XS_Object_GetHeading)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetHeadingData();
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
@@ -445,8 +445,8 @@ XS(XS_Object_VarSave)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->VarSave();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -472,8 +472,8 @@ XS(XS_Object_GetType)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetType();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -498,8 +498,8 @@ XS(XS_Object_SetType)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetType(type);
|
||||
}
|
||||
@@ -524,8 +524,8 @@ XS(XS_Object_GetIcon)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetIcon();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -550,8 +550,8 @@ XS(XS_Object_SetIcon)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetIcon(icon);
|
||||
}
|
||||
@@ -576,8 +576,8 @@ XS(XS_Object_GetItemID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetItemID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -602,8 +602,8 @@ XS(XS_Object_SetItemID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetItemID(itemid);
|
||||
}
|
||||
@@ -628,8 +628,8 @@ XS(XS_Object_SetLocation)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetLocation(x, y, z);
|
||||
}
|
||||
@@ -652,8 +652,8 @@ XS(XS_Object_SetX)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetX(pos);
|
||||
}
|
||||
@@ -676,8 +676,8 @@ XS(XS_Object_SetY)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetY(pos);
|
||||
}
|
||||
@@ -700,8 +700,8 @@ XS(XS_Object_SetZ)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetZ(pos);
|
||||
}
|
||||
@@ -724,8 +724,8 @@ XS(XS_Object_SetHeading)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetHeading(heading);
|
||||
}
|
||||
@@ -740,7 +740,7 @@ XS(XS_Object_SetModelName)
|
||||
Perl_croak(aTHX_ "Usage: Object::SetModelName(THIS, name)");
|
||||
{
|
||||
Object * THIS;
|
||||
char * name = NULL;
|
||||
char * name = nullptr;
|
||||
|
||||
if (sv_derived_from(ST(0), "Object")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
@@ -748,8 +748,8 @@ XS(XS_Object_SetModelName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (items > 1) { name = (char *)SvPV_nolen(ST(1)); }
|
||||
|
||||
@@ -774,8 +774,8 @@ XS(XS_Object_GetModelName)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetModelName();
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
@@ -799,8 +799,8 @@ XS(XS_Object_Repop)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
THIS->Repop();
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
@@ -822,8 +822,8 @@ XS(XS_Object_Depop)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
THIS->Depop();
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
@@ -848,8 +848,8 @@ XS(XS_Object_GetEntityVariable)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetEntityVariable(id);
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
@@ -874,8 +874,8 @@ XS(XS_Object_EntityVariableExists)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->EntityVariableExists(id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -901,8 +901,8 @@ XS(XS_Object_SetEntityVariable)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Object");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetEntityVariable(id, var);
|
||||
}
|
||||
|
||||
+39
-39
@@ -86,8 +86,8 @@ XS(XS_PerlPacket_DESTROY)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not a reference");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
delete THIS;
|
||||
}
|
||||
@@ -111,8 +111,8 @@ XS(XS_PerlPacket_SetOpcode)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->SetOpcode(opcode);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -137,8 +137,8 @@ XS(XS_PerlPacket_Resize)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Resize(len);
|
||||
}
|
||||
@@ -161,8 +161,8 @@ XS(XS_PerlPacket_SendTo)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -170,8 +170,8 @@ XS(XS_PerlPacket_SendTo)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "who is not of type Client");
|
||||
if(who == NULL)
|
||||
Perl_croak(aTHX_ "who is NULL, avoiding crash.");
|
||||
if(who == nullptr)
|
||||
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SendTo(who);
|
||||
}
|
||||
@@ -193,8 +193,8 @@ XS(XS_PerlPacket_SendToAll)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SendToAll();
|
||||
}
|
||||
@@ -216,8 +216,8 @@ XS(XS_PerlPacket_Zero)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->Zero();
|
||||
}
|
||||
@@ -241,8 +241,8 @@ XS(XS_PerlPacket_FromArray)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
AV *av_numbers;
|
||||
if (SvROK(ST(1)) && SvTYPE(SvRV(ST(1)))==SVt_PVAV)
|
||||
@@ -254,7 +254,7 @@ XS(XS_PerlPacket_FromArray)
|
||||
numbers = new int[len_numbers];
|
||||
for(ix_numbers = 0; ix_numbers < len_numbers; ix_numbers ++) {
|
||||
SV **tmp = av_fetch(av_numbers, ix_numbers, 0);
|
||||
if(tmp == NULL || *tmp == NULL) {
|
||||
if(tmp == nullptr || *tmp == nullptr) {
|
||||
numbers[ix_numbers] = 0;
|
||||
continue;
|
||||
}
|
||||
@@ -283,8 +283,8 @@ XS(XS_PerlPacket_SetByte)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetByte(pos, val);
|
||||
}
|
||||
@@ -308,8 +308,8 @@ XS(XS_PerlPacket_SetShort)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetShort(pos, val);
|
||||
}
|
||||
@@ -333,8 +333,8 @@ XS(XS_PerlPacket_SetLong)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetLong(pos, val);
|
||||
}
|
||||
@@ -358,8 +358,8 @@ XS(XS_PerlPacket_SetFloat)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetFloat(pos, val);
|
||||
}
|
||||
@@ -383,8 +383,8 @@ XS(XS_PerlPacket_SetString)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetString(pos, str);
|
||||
}
|
||||
@@ -409,8 +409,8 @@ XS(XS_PerlPacket_SetEQ1319)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetEQ1319(pos, part13, part19);
|
||||
}
|
||||
@@ -435,8 +435,8 @@ XS(XS_PerlPacket_SetEQ1913)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SetEQ1913(pos, part19, part13);
|
||||
}
|
||||
@@ -461,8 +461,8 @@ XS(XS_PerlPacket_GetByte)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetByte(pos);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -488,8 +488,8 @@ XS(XS_PerlPacket_GetShort)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetShort(pos);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -515,8 +515,8 @@ XS(XS_PerlPacket_GetLong)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetLong(pos);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -542,8 +542,8 @@ XS(XS_PerlPacket_GetFloat)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type PerlPacket");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetFloat(pos);
|
||||
XSprePUSH; PUSHn((double)RETVAL);
|
||||
|
||||
+16
-16
@@ -48,8 +48,8 @@ XS(XS_QuestItem_GetName) {
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetItem()->Name;
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
@@ -73,8 +73,8 @@ XS(XS_QuestItem_SetScale)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
Mult = (float)SvNV(ST(1));
|
||||
|
||||
@@ -102,8 +102,8 @@ XS(XS_QuestItem_ItemSay)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
text = SvPV_nolen(ST(1));
|
||||
if(items == 3)
|
||||
@@ -131,8 +131,8 @@ XS(XS_QuestItem_IsType)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsType((ItemClass)type);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -157,8 +157,8 @@ XS(XS_QuestItem_IsAttuned)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsInstNoDrop();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -184,8 +184,8 @@ XS(XS_QuestItem_GetCharges)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCharges();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
@@ -210,8 +210,8 @@ XS(XS_QuestItem_GetAugment)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetAugment(slot_id);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -237,8 +237,8 @@ XS(XS_QuestItem_GetID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type ItemInst");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetItem()->ID;
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
|
||||
+49
-49
@@ -59,8 +59,8 @@ XS(XS_Raid_IsRaidMember)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsRaidMember(name);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -87,8 +87,8 @@ XS(XS_Raid_CastGroupSpell)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -96,8 +96,8 @@ XS(XS_Raid_CastGroupSpell)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "caster is not of type Mob");
|
||||
if(caster == NULL)
|
||||
Perl_croak(aTHX_ "caster is NULL, avoiding crash.");
|
||||
if(caster == nullptr)
|
||||
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
|
||||
|
||||
THIS->CastGroupSpell(caster, spellid, gid);
|
||||
}
|
||||
@@ -122,8 +122,8 @@ XS(XS_Raid_GroupCount)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GroupCount(gid);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -148,8 +148,8 @@ XS(XS_Raid_RaidCount)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->RaidCount();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -175,8 +175,8 @@ XS(XS_Raid_GetGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGroup(name);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -201,8 +201,8 @@ XS(XS_Raid_SplitExp)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(2), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(2)));
|
||||
@@ -210,8 +210,8 @@ XS(XS_Raid_SplitExp)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "other is not of type Mob");
|
||||
if(other == NULL)
|
||||
Perl_croak(aTHX_ "other is NULL, avoiding crash.");
|
||||
if(other == nullptr)
|
||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SplitExp(exp, other);
|
||||
}
|
||||
@@ -236,8 +236,8 @@ XS(XS_Raid_GetTotalRaidDamage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -245,8 +245,8 @@ XS(XS_Raid_GetTotalRaidDamage)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "other is not of type Mob");
|
||||
if(other == NULL)
|
||||
Perl_croak(aTHX_ "other is NULL, avoiding crash.");
|
||||
if(other == nullptr)
|
||||
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetTotalRaidDamage(other);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -273,8 +273,8 @@ XS(XS_Raid_SplitMoney)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SplitMoney(copper, silver, gold, platinum);
|
||||
}
|
||||
@@ -298,8 +298,8 @@ XS(XS_Raid_BalanceHP)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->BalanceHP(penalty, gid);
|
||||
}
|
||||
@@ -323,8 +323,8 @@ XS(XS_Raid_IsLeader)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsLeader(name);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -350,8 +350,8 @@ XS(XS_Raid_IsGroupLeader)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->IsGroupLeader(who);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
@@ -377,8 +377,8 @@ XS(XS_Raid_GetHighestLevel)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetHighestLevel();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -403,8 +403,8 @@ XS(XS_Raid_GetLowestLevel)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetLowestLevel();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -429,8 +429,8 @@ XS(XS_Raid_GetClientByIndex)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetClientByIndex(index);
|
||||
ST(0) = sv_newmortal();
|
||||
@@ -461,8 +461,8 @@ XS(XS_Raid_TeleportGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -470,8 +470,8 @@ XS(XS_Raid_TeleportGroup)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||
if(sender == NULL)
|
||||
Perl_croak(aTHX_ "sender is NULL, avoiding crash.");
|
||||
if(sender == nullptr)
|
||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||
|
||||
THIS->TeleportGroup(sender, zoneID, 0, x, y, z, heading, gid);
|
||||
}
|
||||
@@ -499,8 +499,8 @@ XS(XS_Raid_TeleportRaid)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(1)));
|
||||
@@ -508,8 +508,8 @@ XS(XS_Raid_TeleportRaid)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "sender is not of type Mob");
|
||||
if(sender == NULL)
|
||||
Perl_croak(aTHX_ "sender is NULL, avoiding crash.");
|
||||
if(sender == nullptr)
|
||||
Perl_croak(aTHX_ "sender is nullptr, avoiding crash.");
|
||||
|
||||
THIS->TeleportRaid(sender, zoneID, 0, x, y, z, heading);
|
||||
}
|
||||
@@ -533,8 +533,8 @@ XS(XS_Raid_GetID)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
@@ -550,7 +550,7 @@ XS(XS_Raid_GetMember)
|
||||
Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, index)");
|
||||
{
|
||||
Raid * THIS;
|
||||
Client* RETVAL = NULL;
|
||||
Client* RETVAL = nullptr;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Raid")) {
|
||||
@@ -559,14 +559,14 @@ XS(XS_Raid_GetMember)
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Raid");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
int index = (int)SvUV(ST(1));
|
||||
if (index < 0 || index > 71)
|
||||
RETVAL = NULL;
|
||||
RETVAL = nullptr;
|
||||
else {
|
||||
if(THIS->members[index].member != NULL)
|
||||
if(THIS->members[index].member != nullptr)
|
||||
RETVAL = THIS->members[index].member->CastToClient();
|
||||
}
|
||||
|
||||
|
||||
+19
-19
@@ -26,13 +26,13 @@
|
||||
|
||||
PerlPacket::PerlPacket(const char *opcode, uint32 length) {
|
||||
SetOpcode(opcode);
|
||||
packet = NULL;
|
||||
packet = nullptr;
|
||||
len = 0;
|
||||
Resize(length);
|
||||
}
|
||||
|
||||
PerlPacket::~PerlPacket() {
|
||||
if(packet != NULL)
|
||||
if(packet != nullptr)
|
||||
safe_delete_array(packet);
|
||||
}
|
||||
|
||||
@@ -46,11 +46,11 @@ void PerlPacket::Resize(uint32 length) {
|
||||
Zero();
|
||||
if(len == length)
|
||||
return;
|
||||
if(packet != NULL)
|
||||
if(packet != nullptr)
|
||||
safe_delete_array(packet);
|
||||
len = length;
|
||||
if(len == 0)
|
||||
packet = NULL;
|
||||
packet = nullptr;
|
||||
else {
|
||||
packet = new unsigned char[len];
|
||||
Zero();
|
||||
@@ -59,7 +59,7 @@ void PerlPacket::Resize(uint32 length) {
|
||||
|
||||
//sending functions
|
||||
void PerlPacket::SendTo(Client *who) {
|
||||
if(!who || op == OP_Unknown || (len > 0 && packet == NULL))
|
||||
if(!who || op == OP_Unknown || (len > 0 && packet == nullptr))
|
||||
return;
|
||||
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(op, len);
|
||||
@@ -73,19 +73,19 @@ void PerlPacket::SendTo(Client *who) {
|
||||
}
|
||||
|
||||
void PerlPacket::SendToAll() {
|
||||
if(op == OP_Unknown || (len > 0 && packet == NULL))
|
||||
if(op == OP_Unknown || (len > 0 && packet == nullptr))
|
||||
return;
|
||||
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(op, len);
|
||||
if(len > 0)
|
||||
memcpy(outapp->pBuffer, packet, len);
|
||||
entity_list.QueueClients(NULL, outapp, false);
|
||||
entity_list.QueueClients(nullptr, outapp, false);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
//editing
|
||||
void PerlPacket::Zero() {
|
||||
if(len == 0 || packet == NULL)
|
||||
if(len == 0 || packet == nullptr)
|
||||
return;
|
||||
memset(packet, 0, len);
|
||||
}
|
||||
@@ -101,28 +101,28 @@ void PerlPacket::FromArray(int numbers[], uint32 length) {
|
||||
}
|
||||
|
||||
void PerlPacket::SetByte(uint32 pos, uint8 val) {
|
||||
if(pos + sizeof(val) > len || packet == NULL)
|
||||
if(pos + sizeof(val) > len || packet == nullptr)
|
||||
return;
|
||||
uint8 *p = (uint8 *) (packet + pos);
|
||||
*p = val;
|
||||
}
|
||||
|
||||
void PerlPacket::SetShort(uint32 pos, uint16 val) {
|
||||
if(pos + sizeof(val) > len || packet == NULL)
|
||||
if(pos + sizeof(val) > len || packet == nullptr)
|
||||
return;
|
||||
uint16 *p = (uint16 *) (packet + pos);
|
||||
*p = val;
|
||||
}
|
||||
|
||||
void PerlPacket::SetLong(uint32 pos, uint32 val) {
|
||||
if(pos + sizeof(val) > len || packet == NULL)
|
||||
if(pos + sizeof(val) > len || packet == nullptr)
|
||||
return;
|
||||
uint32 *p = (uint32 *) (packet + pos);
|
||||
*p = val;
|
||||
}
|
||||
|
||||
void PerlPacket::SetFloat(uint32 pos, float val) {
|
||||
if(pos + sizeof(val) > len || packet == NULL)
|
||||
if(pos + sizeof(val) > len || packet == nullptr)
|
||||
return;
|
||||
float *p = (float *) (packet + pos);
|
||||
*p = val;
|
||||
@@ -130,7 +130,7 @@ void PerlPacket::SetFloat(uint32 pos, float val) {
|
||||
|
||||
void PerlPacket::SetString(uint32 pos, char *str) {
|
||||
int slen = strlen(str);
|
||||
if(pos + slen > len || packet == NULL)
|
||||
if(pos + slen > len || packet == nullptr)
|
||||
return;
|
||||
strcpy((char *)(packet+pos), str);
|
||||
}
|
||||
@@ -147,7 +147,7 @@ struct EQ1913 {
|
||||
#pragma pack()
|
||||
|
||||
void PerlPacket::SetEQ1319(uint32 pos, float part13, float part19) {
|
||||
if(pos + sizeof(EQ1319) > len || packet == NULL)
|
||||
if(pos + sizeof(EQ1319) > len || packet == nullptr)
|
||||
return;
|
||||
EQ1319 *p = (EQ1319 *) (packet + pos);
|
||||
p->part19 = FloatToEQ19(part19);
|
||||
@@ -155,7 +155,7 @@ void PerlPacket::SetEQ1319(uint32 pos, float part13, float part19) {
|
||||
}
|
||||
|
||||
void PerlPacket::SetEQ1913(uint32 pos, float part19, float part13) {
|
||||
if(pos + sizeof(EQ1913) > len || packet == NULL)
|
||||
if(pos + sizeof(EQ1913) > len || packet == nullptr)
|
||||
return;
|
||||
EQ1913 *p = (EQ1913 *) (packet + pos);
|
||||
p->part19 = FloatToEQ19(part19);
|
||||
@@ -164,28 +164,28 @@ void PerlPacket::SetEQ1913(uint32 pos, float part19, float part13) {
|
||||
|
||||
//reading
|
||||
uint8 PerlPacket::GetByte(uint32 pos) {
|
||||
if(pos + sizeof(uint8) > len || packet == NULL)
|
||||
if(pos + sizeof(uint8) > len || packet == nullptr)
|
||||
return(0);
|
||||
uint8 *p = (uint8 *) (packet + pos);
|
||||
return(*p);
|
||||
}
|
||||
|
||||
uint16 PerlPacket::GetShort(uint32 pos) {
|
||||
if(pos + sizeof(uint16) > len || packet == NULL)
|
||||
if(pos + sizeof(uint16) > len || packet == nullptr)
|
||||
return(0);
|
||||
uint16 *p = (uint16 *) (packet + pos);
|
||||
return(*p);
|
||||
}
|
||||
|
||||
uint32 PerlPacket::GetLong(uint32 pos) {
|
||||
if(pos + sizeof(uint32) > len || packet == NULL)
|
||||
if(pos + sizeof(uint32) > len || packet == nullptr)
|
||||
return(0);
|
||||
uint32 *p = (uint32 *) (packet + pos);
|
||||
return(*p);
|
||||
}
|
||||
|
||||
float PerlPacket::GetFloat(uint32 pos) {
|
||||
if(pos + sizeof(float) > len || packet == NULL)
|
||||
if(pos + sizeof(float) > len || packet == nullptr)
|
||||
return(0);
|
||||
float *p = (float *) (packet + pos);
|
||||
return(*p);
|
||||
|
||||
+3
-3
@@ -113,7 +113,7 @@ void PerlXSParser::SendCommands(const char * pkgprefix, const char *event, uint3
|
||||
if(mob && mob->IsClient())
|
||||
quest_manager.StartQuest(other, mob->CastToClient(), iteminst);
|
||||
else
|
||||
quest_manager.StartQuest(other, NULL, NULL);
|
||||
quest_manager.StartQuest(other, nullptr, nullptr);
|
||||
|
||||
try {
|
||||
|
||||
@@ -127,7 +127,7 @@ void PerlXSParser::SendCommands(const char * pkgprefix, const char *event, uint3
|
||||
Client *curc = quest_manager.GetInitiator();
|
||||
snprintf(namebuf, 64, "%s::client", pkgprefix);
|
||||
SV *client = get_sv(namebuf, true);
|
||||
if(curc != NULL) {
|
||||
if(curc != nullptr) {
|
||||
sv_setref_pv(client, "Client", curc);
|
||||
} else {
|
||||
//clear out the value, mainly to get rid of blessedness
|
||||
@@ -262,7 +262,7 @@ XS(XS_MobList_new)
|
||||
|
||||
ListElement<Mob*>* RETVAL;
|
||||
|
||||
RETVAL = NULL;
|
||||
RETVAL = nullptr;
|
||||
ST(0) = sv_newmortal();
|
||||
if(RETVAL)
|
||||
sv_setref_pv(ST(0), "MobList", (void*)RETVAL);
|
||||
|
||||
+11
-11
@@ -227,7 +227,7 @@ void Mob::MakePet(uint16 spell_id, const char* pettype, const char *petname) {
|
||||
// of a client is searched for and used instead.
|
||||
void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, const char *petname) {
|
||||
// Sanity and early out checking first.
|
||||
if(HasPet() || pettype == NULL)
|
||||
if(HasPet() || pettype == nullptr)
|
||||
return;
|
||||
|
||||
int16 act_power = 0; // The actual pet power we'll use.
|
||||
@@ -254,7 +254,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, c
|
||||
|
||||
//find the NPC data for the specified NPC type
|
||||
const NPCType *base = database.GetNPCType(record.npc_type);
|
||||
if(base == NULL) {
|
||||
if(base == nullptr) {
|
||||
Message(13, "Unable to load NPC data for pet %s", pettype);
|
||||
LogFile->write(EQEMuLog::Error, "Unable to load NPC data for pet %s (NPC ID %d), check pets and npc_types tables.", pettype, record.npc_type);
|
||||
return;
|
||||
@@ -299,7 +299,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, c
|
||||
// 4 - Keep DB name
|
||||
|
||||
|
||||
if (petname != NULL) {
|
||||
if (petname != nullptr) {
|
||||
// Name was provided, use it.
|
||||
strn0cpy(npc_type->name, petname, 64);
|
||||
} else if (record.petnaming == 0) {
|
||||
@@ -363,8 +363,8 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, c
|
||||
if(record.monsterflag) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_RES *result = NULL;
|
||||
MYSQL_ROW row = NULL;
|
||||
MYSQL_RES *result = nullptr;
|
||||
MYSQL_ROW row = nullptr;
|
||||
uint32 monsterid;
|
||||
|
||||
// get a random npc id from the spawngroups assigned to this zone
|
||||
@@ -488,17 +488,17 @@ bool ZoneDatabase::GetPoweredPetEntry(const char *pet_type, int16 petpower, PetR
|
||||
|
||||
Mob* Mob::GetPet() {
|
||||
if(GetPetID() == 0)
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
|
||||
Mob* tmp = entity_list.GetMob(GetPetID());
|
||||
if(tmp == NULL) {
|
||||
if(tmp == nullptr) {
|
||||
SetPetID(0);
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
if(tmp->GetOwnerID() != GetID()) {
|
||||
SetPetID(0);
|
||||
return(NULL);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
return(tmp);
|
||||
@@ -509,7 +509,7 @@ void Mob::SetPet(Mob* newpet) {
|
||||
if (oldpet) {
|
||||
oldpet->SetOwnerID(0);
|
||||
}
|
||||
if (newpet == NULL) {
|
||||
if (newpet == nullptr) {
|
||||
SetPetID(0);
|
||||
} else {
|
||||
SetPetID(newpet->GetID());
|
||||
@@ -641,7 +641,7 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) {
|
||||
// shared memory at some point due to the number of queries needed to load a
|
||||
// nested set.
|
||||
bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) {
|
||||
if (equipmentset < 0 || items == NULL)
|
||||
if (equipmentset < 0 || items == nullptr)
|
||||
return false;
|
||||
|
||||
// Equipment sets can be nested. We start with the top-most one and
|
||||
|
||||
+31
-31
@@ -109,7 +109,7 @@ void QuestManager::Process() {
|
||||
//make sure the mob is still in zone.
|
||||
if(entity_list.IsMobInZone(cur->mob)){
|
||||
if(cur->mob->IsNPC()) {
|
||||
parse->EventNPC(EVENT_TIMER, cur->mob->CastToNPC(), NULL, cur->name, 0);
|
||||
parse->EventNPC(EVENT_TIMER, cur->mob->CastToNPC(), nullptr, cur->name, 0);
|
||||
}
|
||||
else {
|
||||
//this is inheriently unsafe if we ever make it so more than npc/client start timers
|
||||
@@ -184,7 +184,7 @@ void QuestManager::EndQuest() {
|
||||
}
|
||||
|
||||
owner->Depop();
|
||||
owner = NULL; //just to be safe
|
||||
owner = nullptr; //just to be safe
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ void QuestManager::echo(int colour, const char *str) {
|
||||
|
||||
void QuestManager::say(const char *str) {
|
||||
if (!owner) {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::say called with NULL owner. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::say called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -224,7 +224,7 @@ void QuestManager::say(const char *str) {
|
||||
|
||||
void QuestManager::say(const char *str, uint8 language) {
|
||||
if (!owner) {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::say called with NULL owner. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::say called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -276,7 +276,7 @@ uint16 QuestManager::spawn2(int npc_type, int grid, int unused, float x, float y
|
||||
|
||||
uint16 QuestManager::unique_spawn(int npc_type, int grid, int unused, float x, float y, float z, float heading) {
|
||||
Mob *other = entity_list.GetMobByNpcTypeID(npc_type);
|
||||
if(other != NULL) {
|
||||
if(other != nullptr) {
|
||||
return(other->GetID());
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ uint16 QuestManager::spawn_from_spawn2(uint32 spawn2_id)
|
||||
{
|
||||
LinkedListIterator<Spawn2*> iterator(zone->spawn2_list);
|
||||
iterator.Reset();
|
||||
Spawn2 *found_spawn = NULL;
|
||||
Spawn2 *found_spawn = nullptr;
|
||||
|
||||
while(iterator.MoreElements())
|
||||
{
|
||||
@@ -416,7 +416,7 @@ void QuestManager::incstat(int stat, int value) { //old setstat command aza
|
||||
void QuestManager::castspell(int spell_id, int target_id) {
|
||||
if (owner) {
|
||||
Mob *tgt = entity_list.GetMob(target_id);
|
||||
if(tgt != NULL)
|
||||
if(tgt != nullptr)
|
||||
owner->SpellFinished(spell_id, tgt, 10, 0, -1, spells[spell_id].ResistDiff);
|
||||
}
|
||||
}
|
||||
@@ -528,7 +528,7 @@ void QuestManager::stopalltimers() {
|
||||
|
||||
void QuestManager::emote(const char *str) {
|
||||
if (!owner) {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::emote called with NULL owner. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::emote called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -538,7 +538,7 @@ void QuestManager::emote(const char *str) {
|
||||
|
||||
void QuestManager::shout(const char *str) {
|
||||
if (!owner) {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::shout called with NULL owner. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::shout called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -548,7 +548,7 @@ void QuestManager::shout(const char *str) {
|
||||
|
||||
void QuestManager::shout2(const char *str) {
|
||||
if (!owner) {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::shout2 called with NULL owner. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::shout2 called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -565,7 +565,7 @@ void QuestManager::gmsay(const char *str, uint32 color, bool send_to_world, uint
|
||||
|
||||
void QuestManager::depop(int npc_type) { // depop NPC and don't start spawn timer
|
||||
if (!owner || !owner->IsNPC()) {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depop called with NULL owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depop called with nullptr owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -588,7 +588,7 @@ void QuestManager::depop(int npc_type) { // depop NPC and don't start spawn time
|
||||
|
||||
void QuestManager::depop_withtimer(int npc_type) { // depop NPC and start spawn timer
|
||||
if (!owner || !owner->IsNPC()) {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depop_withtimer called with NULL owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depop_withtimer called with nullptr owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -614,7 +614,7 @@ void QuestManager::depopall(int npc_type) {
|
||||
entity_list.DepopAll(npc_type);
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depopall called with NULL owner, non-NPC owner, or invalid NPC Type ID. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depopall called with nullptr owner, non-NPC owner, or invalid NPC Type ID. Probably syntax error in quest file.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ void QuestManager::depopzone(bool StartSpawnTimer) {
|
||||
zone->Depop(StartSpawnTimer);
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depopzone called with NULL zone. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::depopzone called with nullptr zone. Probably syntax error in quest file.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,21 +632,21 @@ void QuestManager::repopzone() {
|
||||
zone->Repop();
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::repopzone called with NULL zone. Probably syntax error in quest file.");
|
||||
LogFile->write(EQEMuLog::Quest, "QuestManager::repopzone called with nullptr zone. Probably syntax error in quest file.");
|
||||
}
|
||||
}
|
||||
|
||||
void QuestManager::settarget(const char *type, int target_id) {
|
||||
if(!owner->IsNPC())
|
||||
return;
|
||||
Mob* tmp = NULL;
|
||||
Mob* tmp = nullptr;
|
||||
if (!strcasecmp(type,"npctype")) {
|
||||
tmp = entity_list.GetMobByNpcTypeID(target_id);
|
||||
}
|
||||
else if (!strcasecmp(type, "entity")) {
|
||||
tmp = entity_list.GetMob(target_id);
|
||||
}
|
||||
if(tmp != NULL) {
|
||||
if(tmp != nullptr) {
|
||||
owner->SetTarget(tmp);
|
||||
}
|
||||
}
|
||||
@@ -700,7 +700,7 @@ void QuestManager::traindisc(int discipline_tome_item_id) {
|
||||
bool QuestManager::isdisctome(int item_id) {
|
||||
//get the item info
|
||||
const Item_Struct *item = database.GetItem(item_id);
|
||||
if(item == NULL) {
|
||||
if(item == nullptr) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -992,11 +992,11 @@ void QuestManager::movegrp(int zoneid, float x, float y, float z) {
|
||||
if (initiator && initiator->IsClient())
|
||||
{
|
||||
Group *g = entity_list.GetGroupByClient(initiator);
|
||||
if (g != NULL){
|
||||
if (g != nullptr){
|
||||
g->TeleportGroup(owner, zoneid, 0, x, y, z, 0.0f);
|
||||
} else {
|
||||
Raid *r = entity_list.GetRaidByClient(initiator);
|
||||
if (r != NULL){
|
||||
if (r != nullptr){
|
||||
uint32 gid = r->GetGroup(initiator);
|
||||
if (gid >= 0 && gid < 12) {
|
||||
r->TeleportGroup(owner, zoneid, 0, x, y, z, 0.0f, gid);
|
||||
@@ -1241,11 +1241,11 @@ int QuestManager::InsertQuestGlobal(
|
||||
char *query = 0;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
|
||||
// Make duration string either "unix_timestamp(now()) + xxx" or "NULL"
|
||||
// Make duration string either "unix_timestamp(now()) + xxx" or "nullptr"
|
||||
stringstream duration_ss;
|
||||
if (duration == INT_MAX)
|
||||
{
|
||||
duration_ss << "NULL";
|
||||
duration_ss << "nullptr";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1259,7 +1259,7 @@ int QuestManager::InsertQuestGlobal(
|
||||
"REPLACE INTO quest_globals (charid, npcid, zoneid, name, value, expdate)"
|
||||
"VALUES (%i, %i, %i, '%s', '%s', %s)",
|
||||
charid, npcid, zoneid, varname, varvalue, duration_ss.str().c_str()
|
||||
), errbuf, NULL, NULL, &last_id))
|
||||
), errbuf, nullptr, nullptr, &last_id))
|
||||
{
|
||||
cerr << "setglobal error inserting " << varname << " : " << errbuf << endl;
|
||||
}
|
||||
@@ -1557,7 +1557,7 @@ void QuestManager::setanim(int npc_type, int animnum) {
|
||||
|
||||
//displays an in game path based on a waypoint grid
|
||||
void QuestManager::showgrid(int grid) {
|
||||
if(initiator == NULL)
|
||||
if(initiator == nullptr)
|
||||
return;
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
@@ -2159,7 +2159,7 @@ int QuestManager::getlevel(uint8 type)
|
||||
else if(type == 1)
|
||||
{
|
||||
Group *g = entity_list.GetGroupByClient(initiator);
|
||||
if (g != NULL)
|
||||
if (g != nullptr)
|
||||
return (g->GetAvgLevel());
|
||||
else
|
||||
return 0;
|
||||
@@ -2167,7 +2167,7 @@ int QuestManager::getlevel(uint8 type)
|
||||
else if(type == 2)
|
||||
{
|
||||
Raid *r = entity_list.GetRaidByClient(initiator);
|
||||
if (r != NULL)
|
||||
if (r != nullptr)
|
||||
return (r->GetAvgLevel());
|
||||
else
|
||||
return 0;
|
||||
@@ -2175,12 +2175,12 @@ int QuestManager::getlevel(uint8 type)
|
||||
else if(type == 3)
|
||||
{
|
||||
Raid *r = entity_list.GetRaidByClient(initiator);
|
||||
if(r != NULL)
|
||||
if(r != nullptr)
|
||||
{
|
||||
return (r->GetAvgLevel());
|
||||
}
|
||||
Group *g = entity_list.GetGroupByClient(initiator);
|
||||
if(g != NULL)
|
||||
if(g != nullptr)
|
||||
{
|
||||
return (g->GetAvgLevel());
|
||||
}
|
||||
@@ -2311,7 +2311,7 @@ void QuestManager::MerchantSetItem(uint32 NPCid, uint32 itemid, uint32 quantity)
|
||||
if (merchant == 0 || !merchant->IsNPC() || (merchant->GetClass() != MERCHANT))
|
||||
return; // don't do anything if NPCid isn't a merchant
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
item = database.GetItem(itemid);
|
||||
if (!item) return; // if the item id doesn't correspond to a real item, do nothing
|
||||
|
||||
@@ -2324,7 +2324,7 @@ uint32 QuestManager::MerchantCountItem(uint32 NPCid, uint32 itemid) {
|
||||
if (merchant == 0 || !merchant->IsNPC() || (merchant->GetClass() != MERCHANT))
|
||||
return 0; // if it isn't a merchant, it doesn't have any items
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
item = database.GetItem(itemid);
|
||||
if (!item) return 0; // likewise, if it isn't a valid item, the merchant doesn't have any
|
||||
|
||||
@@ -2690,7 +2690,7 @@ void QuestManager::LearnRecipe(uint32 recipe_id) {
|
||||
}
|
||||
|
||||
void QuestManager::SendMail(const char *to, const char *from, const char *subject, const char *message) {
|
||||
if(to == NULL || from == NULL || subject == NULL || message == NULL) {
|
||||
if(to == nullptr || from == nullptr || subject == nullptr || message == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -34,7 +34,7 @@ public:
|
||||
QuestManager();
|
||||
virtual ~QuestManager();
|
||||
|
||||
void StartQuest(Mob *_owner, Client *_initiator = NULL, ItemInst* _questitem = NULL);
|
||||
void StartQuest(Mob *_owner, Client *_initiator = nullptr, ItemInst* _questitem = nullptr);
|
||||
void EndQuest();
|
||||
|
||||
void Process();
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
//thing ChooseRandom(array_of_things)
|
||||
|
||||
inline Client *GetInitiator() const { return(initiator); }
|
||||
inline NPC *GetNPC() const { return(owner->IsNPC()?owner->CastToNPC():NULL); }
|
||||
inline NPC *GetNPC() const { return(owner->IsNPC()?owner->CastToNPC():nullptr); }
|
||||
inline Mob *GetOwner() const { return(owner); }
|
||||
inline ItemInst *GetQuestItem() const {return questitem; }
|
||||
inline bool ProximitySayInUse() { return HaveProximitySays; }
|
||||
@@ -260,9 +260,9 @@ public:
|
||||
inline uint16 GetMana(uint32 spell_id) { return( spells[spell_id].mana); }
|
||||
|
||||
protected:
|
||||
Mob *owner; //NPC is never NULL when functions are called.
|
||||
Mob *owner; //NPC is never nullptr when functions are called.
|
||||
Client *initiator; //this can be null.
|
||||
ItemInst* questitem; // this is usually NULL.
|
||||
ItemInst* questitem; // this is usually nullptr.
|
||||
|
||||
bool depop_npc; //true if EndQuest should depop the NPC
|
||||
|
||||
|
||||
+10
-10
@@ -29,7 +29,7 @@ Raid::Raid(uint32 raidID)
|
||||
: GroupIDConsumer(raidID)
|
||||
{
|
||||
memset(members ,0, (sizeof(RaidMember)*MAX_RAID_MEMBERS));
|
||||
leader = NULL;
|
||||
leader = nullptr;
|
||||
memset(leadername, 0, 64);
|
||||
locked = false;
|
||||
LootType = 4;
|
||||
@@ -403,7 +403,7 @@ uint32 Raid::GetPlayerIndex(const char *name){
|
||||
Client *Raid::GetClientByIndex(uint16 index)
|
||||
{
|
||||
if(index > MAX_RAID_MEMBERS)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return members[index].member;
|
||||
}
|
||||
@@ -428,7 +428,7 @@ void Raid::CastGroupSpell(Mob* caster, uint16 spellid, uint32 gid)
|
||||
caster->SpellOnTarget(spellid, caster->GetPet());
|
||||
#endif
|
||||
}
|
||||
else if(members[x].member != NULL)
|
||||
else if(members[x].member != nullptr)
|
||||
{
|
||||
if(members[x].GroupNumber == gid){
|
||||
distance = caster->DistNoRoot(*members[x].member);
|
||||
@@ -573,7 +573,7 @@ void Raid::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum
|
||||
uint32 i;
|
||||
uint8 membercount = 0;
|
||||
for (i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if (members[i].member != NULL) {
|
||||
if (members[i].member != nullptr) {
|
||||
|
||||
membercount++;
|
||||
}
|
||||
@@ -647,7 +647,7 @@ void Raid::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum
|
||||
msg += " as your split";
|
||||
|
||||
for (i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if (members[i].member != NULL) { // If Group Member is Client
|
||||
if (members[i].member != nullptr) { // If Group Member is Client
|
||||
//I could not get MoneyOnCorpse to work, so we use this
|
||||
members[i].member->AddMoneyToPP(cpsplit, spsplit, gpsplit, ppsplit, true);
|
||||
|
||||
@@ -675,7 +675,7 @@ void Raid::GroupBardPulse(Mob* caster, uint16 spellid, uint32 gid){
|
||||
caster->BardPulse(spellid, caster->GetPet());
|
||||
#endif
|
||||
}
|
||||
else if(members[z].member != NULL)
|
||||
else if(members[z].member != nullptr)
|
||||
{
|
||||
if(members[z].GroupNumber == gid){
|
||||
distance = caster->DistNoRoot(*members[z].member);
|
||||
@@ -1303,7 +1303,7 @@ bool Raid::LearnMembers()
|
||||
while((row = mysql_fetch_row(result))) {
|
||||
if(!row[0])
|
||||
continue;
|
||||
members[i].member = NULL;
|
||||
members[i].member = nullptr;
|
||||
strn0cpy(members[i].membername, row[0], 64);
|
||||
int GroupNum = atoi(row[1]);
|
||||
if(GroupNum > 11)
|
||||
@@ -1327,7 +1327,7 @@ void Raid::VerifyRaid()
|
||||
for(int x = 0; x < MAX_RAID_MEMBERS; x++)
|
||||
{
|
||||
if(strlen(members[x].membername) == 0){
|
||||
members[x].member = NULL;
|
||||
members[x].member = nullptr;
|
||||
}
|
||||
else{
|
||||
Client *c = entity_list.GetClientByName(members[x].membername);
|
||||
@@ -1335,7 +1335,7 @@ void Raid::VerifyRaid()
|
||||
members[x].member = c;
|
||||
}
|
||||
else{
|
||||
members[x].member = NULL;
|
||||
members[x].member = nullptr;
|
||||
}
|
||||
}
|
||||
if(members[x].IsRaidLeader){
|
||||
@@ -1356,7 +1356,7 @@ void Raid::MemberZoned(Client *c)
|
||||
{
|
||||
if(members[x].member == c)
|
||||
{
|
||||
members[x].member = NULL;
|
||||
members[x].member = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -154,7 +154,7 @@ public:
|
||||
void BalanceHP(int32 penalty, uint32 gid);
|
||||
void BalanceMana(int32 penalty, uint32 gid);
|
||||
void HealGroup(uint32 heal_amt, Mob* caster, uint32 gid);
|
||||
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter = NULL);
|
||||
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter = nullptr);
|
||||
void GroupBardPulse(Mob* caster, uint16 spellid, uint32 gid);
|
||||
|
||||
void TeleportGroup(Mob* sender, uint32 zoneID, uint16 instance_id, float x, float y, float z, float heading, uint32 gid);
|
||||
|
||||
+29
-29
@@ -33,33 +33,33 @@ extern WorldServer worldserver;
|
||||
/*
|
||||
|
||||
CREATE TABLE spawn_conditions (
|
||||
zone VARCHAR(16) NOT NULL,
|
||||
id MEDIUMINT UNSIGNED NOT NULL DEFAULT '1',
|
||||
value MEDIUMINT NOT NULL DEFAULT '0',
|
||||
onchange TINYINT UNSIGNED NOT NULL DEFAULT '0',
|
||||
name VARCHAR(255) NOT NULL DEFAULT '',
|
||||
zone VARCHAR(16) NOT nullptr,
|
||||
id MEDIUMINT UNSIGNED NOT nullptr DEFAULT '1',
|
||||
value MEDIUMINT NOT nullptr DEFAULT '0',
|
||||
onchange TINYINT UNSIGNED NOT nullptr DEFAULT '0',
|
||||
name VARCHAR(255) NOT nullptr DEFAULT '',
|
||||
PRIMARY KEY(zone,id)
|
||||
);
|
||||
|
||||
CREATE TABLE spawn_events (
|
||||
#identifiers
|
||||
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
||||
zone VARCHAR(16) NOT NULL,
|
||||
cond_id MEDIUMINT UNSIGNED NOT NULL,
|
||||
name VARCHAR(255) NOT NULL DEFAULT '',
|
||||
zone VARCHAR(16) NOT nullptr,
|
||||
cond_id MEDIUMINT UNSIGNED NOT nullptr,
|
||||
name VARCHAR(255) NOT nullptr DEFAULT '',
|
||||
|
||||
#timing information
|
||||
period INT UNSIGNED NOT NULL,
|
||||
next_minute TINYINT UNSIGNED NOT NULL,
|
||||
next_hour TINYINT UNSIGNED NOT NULL,
|
||||
next_day TINYINT UNSIGNED NOT NULL,
|
||||
next_month TINYINT UNSIGNED NOT NULL,
|
||||
next_year INT UNSIGNED NOT NULL,
|
||||
enabled TINYINT NOT NULL DEFAULT '1',
|
||||
period INT UNSIGNED NOT nullptr,
|
||||
next_minute TINYINT UNSIGNED NOT nullptr,
|
||||
next_hour TINYINT UNSIGNED NOT nullptr,
|
||||
next_day TINYINT UNSIGNED NOT nullptr,
|
||||
next_month TINYINT UNSIGNED NOT nullptr,
|
||||
next_year INT UNSIGNED NOT nullptr,
|
||||
enabled TINYINT NOT nullptr DEFAULT '1',
|
||||
|
||||
#action:
|
||||
action TINYINT UNSIGNED NOT NULL DEFAULT '0',
|
||||
argument MEDIUMINT NOT NULL DEFAULT '0'
|
||||
action TINYINT UNSIGNED NOT nullptr DEFAULT '0',
|
||||
argument MEDIUMINT NOT nullptr DEFAULT '0'
|
||||
);
|
||||
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ Spawn2::Spawn2(uint32 in_spawn2_id, uint32 spawngroup_id,
|
||||
grid_ = grid;
|
||||
condition_id = in_cond_id;
|
||||
condition_min_value = in_min_value;
|
||||
npcthis = NULL;
|
||||
npcthis = nullptr;
|
||||
enabled = in_enabled;
|
||||
this->anim = anim;
|
||||
|
||||
@@ -164,12 +164,12 @@ bool Spawn2::Process() {
|
||||
return(true);
|
||||
}
|
||||
|
||||
if (sg == NULL) {
|
||||
if (sg == nullptr) {
|
||||
database.LoadSpawnGroupsByID(spawngroup_id_,&zone->spawn_group_list);
|
||||
sg = zone->spawn_group_list.GetSpawnGroup(spawngroup_id_);
|
||||
}
|
||||
|
||||
if (sg == NULL) {
|
||||
if (sg == nullptr) {
|
||||
_log(SPAWNS__MAIN, "Spawn2 %d: Unable to locate spawn group %d. Disabling.", spawn2_id, spawngroup_id_);
|
||||
return false;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ bool Spawn2::Process() {
|
||||
|
||||
//try to find our NPC type.
|
||||
const NPCType* tmp = database.GetNPCType(npcid);
|
||||
if (tmp == NULL) {
|
||||
if (tmp == nullptr) {
|
||||
_log(SPAWNS__MAIN, "Spawn2 %d: Spawn group %d yeilded an invalid NPC type %d", spawn2_id, spawngroup_id_, npcid);
|
||||
Reset(); //try again later
|
||||
return(true);
|
||||
@@ -271,14 +271,14 @@ void Spawn2::LoadGrid() {
|
||||
*/
|
||||
void Spawn2::Reset() {
|
||||
timer.Start(resetTimer());
|
||||
npcthis = NULL;
|
||||
npcthis = nullptr;
|
||||
_log(SPAWNS__MAIN, "Spawn2 %d: Spawn reset, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
}
|
||||
|
||||
void Spawn2::Depop() {
|
||||
timer.Disable();
|
||||
_log(SPAWNS__MAIN, "Spawn2 %d: Spawn reset, repop disabled", spawn2_id);
|
||||
npcthis = NULL;
|
||||
npcthis = nullptr;
|
||||
}
|
||||
|
||||
void Spawn2::Repop(uint32 delay) {
|
||||
@@ -289,14 +289,14 @@ void Spawn2::Repop(uint32 delay) {
|
||||
_log(SPAWNS__MAIN, "Spawn2 %d: Spawn reset for repop, repop in %d ms", spawn2_id, delay);
|
||||
timer.Start(delay);
|
||||
}
|
||||
npcthis = NULL;
|
||||
npcthis = nullptr;
|
||||
}
|
||||
|
||||
void Spawn2::ForceDespawn()
|
||||
{
|
||||
SpawnGroup* sg = zone->spawn_group_list.GetSpawnGroup(spawngroup_id_);
|
||||
|
||||
if(npcthis != NULL)
|
||||
if(npcthis != nullptr)
|
||||
{
|
||||
if(!npcthis->IsEngaged())
|
||||
{
|
||||
@@ -339,7 +339,7 @@ void Spawn2::DeathReset(bool realdeath)
|
||||
timer.Start(cur);
|
||||
|
||||
//zero out our NPC since he is now gone
|
||||
npcthis = NULL;
|
||||
npcthis = nullptr;
|
||||
|
||||
if(realdeath) { killcount++; }
|
||||
|
||||
@@ -525,13 +525,13 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
|
||||
break;
|
||||
case SpawnCondition::DoDepop:
|
||||
_log(SPAWNS__CONDITIONS, "Spawn2 %d: Our condition is now %s. Depoping our mob.", spawn2_id, new_state?"enabed":"disabled");
|
||||
if(npcthis != NULL)
|
||||
if(npcthis != nullptr)
|
||||
npcthis->Depop(false); //remove the current mob
|
||||
Reset(); //reset our spawn timer
|
||||
break;
|
||||
case SpawnCondition::DoRepop:
|
||||
_log(SPAWNS__CONDITIONS, "Spawn2 %d: Our condition is now %s. Preforming a repop.", spawn2_id, new_state?"enabed":"disabled");
|
||||
if(npcthis != NULL)
|
||||
if(npcthis != nullptr)
|
||||
npcthis->Depop(false); //remove the current mob
|
||||
Repop(); //repop
|
||||
break;
|
||||
@@ -542,7 +542,7 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
|
||||
}
|
||||
int signal_id = c.on_change - SpawnCondition::DoSignalMin;
|
||||
_log(SPAWNS__CONDITIONS, "Spawn2 %d: Our condition is now %s. Signaling our mob with %d.", spawn2_id, new_state?"enabed":"disabled", signal_id);
|
||||
if(npcthis != NULL)
|
||||
if(npcthis != nullptr)
|
||||
npcthis->SignalNPC(signal_id);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public:
|
||||
uint32 spawn2_id;
|
||||
uint32 respawn_;
|
||||
|
||||
bool NPCPointerValid() { return (npcthis!=NULL); }
|
||||
bool NPCPointerValid() { return (npcthis!=nullptr); }
|
||||
void SetNPCPointer(NPC* n) { npcthis = n; }
|
||||
void SetTimer(uint32 duration) { timer.Start(duration); }
|
||||
uint32 GetKillCount() { return killcount; }
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ SpawnGroupList::~SpawnGroupList() {
|
||||
}
|
||||
|
||||
void SpawnGroupList::AddSpawnGroup(SpawnGroup* newGroup) {
|
||||
if(newGroup == NULL)
|
||||
if(newGroup == nullptr)
|
||||
return;
|
||||
groups[newGroup->id] = newGroup;
|
||||
}
|
||||
|
||||
+24
-24
@@ -100,7 +100,7 @@ void Mob::ApplySpecialAttackMod(SkillType skill, int32 &dmg, int32 &mindmg) {
|
||||
}
|
||||
|
||||
if (item_slot >= 0){
|
||||
const ItemInst* itm = NULL;
|
||||
const ItemInst* itm = nullptr;
|
||||
itm = CastToClient()->GetInv().GetItem(item_slot);
|
||||
if(itm)
|
||||
dmg += itm->GetItem()->AC * (RuleI(Combat, SpecialAttackACBonus))/100;
|
||||
@@ -478,7 +478,7 @@ int Mob::MonkSpecialAttack(Mob* other, uint8 unchecked_type)
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(GetWeaponDamage(other, (const Item_Struct*)NULL) <= 0){
|
||||
if(GetWeaponDamage(other, (const Item_Struct*)nullptr) <= 0){
|
||||
ndamage = -5;
|
||||
}
|
||||
}
|
||||
@@ -609,7 +609,7 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
|
||||
int32 backstab_dmg = 0;
|
||||
|
||||
if(IsClient()){
|
||||
const ItemInst *wpn = NULL;
|
||||
const ItemInst *wpn = nullptr;
|
||||
wpn = CastToClient()->GetInv().GetItem(SLOT_PRIMARY);
|
||||
primaryweapondamage = GetWeaponDamage(other, wpn);
|
||||
backstab_dmg = wpn->GetItem()->BackstabDmg;
|
||||
@@ -683,7 +683,7 @@ void Mob::RogueAssassinate(Mob* other)
|
||||
{
|
||||
//can you dodge, parry, etc.. an assassinate??
|
||||
//if so, use DoSpecialAttackDamage(other, BACKSTAB, 32000); instead
|
||||
if(GetWeaponDamage(other, IsClient()?CastToClient()->GetInv().GetItem(SLOT_PRIMARY):(const ItemInst*)NULL) > 0){
|
||||
if(GetWeaponDamage(other, IsClient()?CastToClient()->GetInv().GetItem(SLOT_PRIMARY):(const ItemInst*)nullptr) > 0){
|
||||
other->Damage(this, 32000, SPELL_UNKNOWN, BACKSTAB);
|
||||
}else{
|
||||
other->Damage(this, -5, SPELL_UNKNOWN, BACKSTAB);
|
||||
@@ -742,7 +742,7 @@ void Client::RangedAttack(Mob* other) {
|
||||
bool found = false;
|
||||
for(r = SLOT_PERSONAL_BEGIN; r <= SLOT_PERSONAL_END; r++) {
|
||||
const ItemInst *pi = m_inv[r];
|
||||
if(pi == NULL || !pi->IsType(ItemClassContainer))
|
||||
if(pi == nullptr || !pi->IsType(ItemClassContainer))
|
||||
continue;
|
||||
const Item_Struct* bagitem = pi->GetItem();
|
||||
if(!bagitem || bagitem->BagType != bagTypeQuiver)
|
||||
@@ -963,7 +963,7 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Item
|
||||
}
|
||||
|
||||
//try proc on hits and misses
|
||||
if((RangeWeapon != NULL) && GetTarget() && other && (other->GetHP() > -10))
|
||||
if((RangeWeapon != nullptr) && GetTarget() && other && (other->GetHP() > -10))
|
||||
{
|
||||
TryWeaponProc(RangeWeapon, other, 11);
|
||||
}
|
||||
@@ -986,8 +986,8 @@ void NPC::RangedAttack(Mob* other)
|
||||
}
|
||||
|
||||
//if we have SPECATK_RANGED_ATK set then we range attack without weapon or ammo
|
||||
const Item_Struct* weapon = NULL;
|
||||
const Item_Struct* ammo = NULL;
|
||||
const Item_Struct* weapon = nullptr;
|
||||
const Item_Struct* ammo = nullptr;
|
||||
if(!SpecAttacks[SPECATK_RANGED_ATK])
|
||||
{
|
||||
//find our bow and ammo return if we can't find them...
|
||||
@@ -1158,7 +1158,7 @@ void Client::ThrowingAttack(Mob* other) { //old was 51
|
||||
if(RangeWeapon->GetCharges() == 1) {
|
||||
//first check ammo
|
||||
const ItemInst* AmmoItem = m_inv[SLOT_AMMO];
|
||||
if(AmmoItem != NULL && AmmoItem->GetID() == RangeWeapon->GetID()) {
|
||||
if(AmmoItem != nullptr && AmmoItem->GetID() == RangeWeapon->GetID()) {
|
||||
//more in the ammo slot, use it
|
||||
RangeWeapon = AmmoItem;
|
||||
ammo_slot = SLOT_AMMO;
|
||||
@@ -1251,7 +1251,7 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
|
||||
int16 WDmg = 0;
|
||||
|
||||
if (!weapon_damage && item != NULL)
|
||||
if (!weapon_damage && item != nullptr)
|
||||
WDmg = GetWeaponDamage(other, item);
|
||||
else
|
||||
WDmg = weapon_damage;
|
||||
@@ -1284,7 +1284,7 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
other->Damage(this, TotalDmg, SPELL_UNKNOWN, THROWING);
|
||||
}
|
||||
|
||||
if((RangeWeapon != NULL) && GetTarget() && other && (other->GetHP() > -10))
|
||||
if((RangeWeapon != nullptr) && GetTarget() && other && (other->GetHP() > -10))
|
||||
TryWeaponProc(RangeWeapon, other, 11);
|
||||
}
|
||||
|
||||
@@ -1336,7 +1336,7 @@ void Mob::SendItemAnimation(Mob *to, const Item_Struct *item, SkillType skillInU
|
||||
|
||||
void Mob::ProjectileAnimation(Mob* to, uint16 item_id, bool IsArrow, float speed, float angle, float tilt, float arc) {
|
||||
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
uint8 item_type = 0;
|
||||
|
||||
if(!item_id) {
|
||||
@@ -1396,7 +1396,7 @@ void Mob::ProjectileAnimation(Mob* to, uint16 item_id, bool IsArrow, float speed
|
||||
|
||||
|
||||
void NPC::DoClassAttacks(Mob *target) {
|
||||
if(target == NULL)
|
||||
if(target == nullptr)
|
||||
return; //gotta have a target for all these
|
||||
|
||||
bool taunt_time = taunt_timer.Check();
|
||||
@@ -1484,7 +1484,7 @@ void NPC::DoClassAttacks(Mob *target) {
|
||||
DoAnim(animKick);
|
||||
int32 dmg = 0;
|
||||
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)NULL) <= 0){
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)nullptr) <= 0){
|
||||
dmg = -5;
|
||||
}
|
||||
else{
|
||||
@@ -1506,7 +1506,7 @@ void NPC::DoClassAttacks(Mob *target) {
|
||||
DoAnim(animTailRake);
|
||||
int32 dmg = 0;
|
||||
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)NULL) <= 0){
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)nullptr) <= 0){
|
||||
dmg = -5;
|
||||
}
|
||||
else{
|
||||
@@ -1561,7 +1561,7 @@ void NPC::DoClassAttacks(Mob *target) {
|
||||
DoAnim(animKick);
|
||||
int32 dmg = 0;
|
||||
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)NULL) <= 0){
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)nullptr) <= 0){
|
||||
dmg = -5;
|
||||
}
|
||||
else{
|
||||
@@ -1587,7 +1587,7 @@ void NPC::DoClassAttacks(Mob *target) {
|
||||
DoAnim(animTailRake);
|
||||
int32 dmg = 0;
|
||||
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)NULL) <= 0){
|
||||
if(GetWeaponDamage(target, (const Item_Struct*)nullptr) <= 0){
|
||||
dmg = -5;
|
||||
}
|
||||
else{
|
||||
@@ -1847,7 +1847,7 @@ void Client::DoClassAttacks(Mob *ca_target, uint16 skill, bool IsRiposte)
|
||||
/*
|
||||
void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) {
|
||||
|
||||
if (who == NULL)
|
||||
if (who == nullptr)
|
||||
return;
|
||||
|
||||
if(DivineAura())
|
||||
@@ -1866,7 +1866,7 @@ void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) {
|
||||
// a mob will not be taunted if its target's health is below 20%
|
||||
if ((hate_top != this)
|
||||
&& (who->GetLevel() < level)
|
||||
&& (hate_top == NULL || hate_top->GetHPRatio() >= 20) ) {
|
||||
&& (hate_top == nullptr || hate_top->GetHPRatio() >= 20) ) {
|
||||
int32 newhate, tauntvalue;
|
||||
|
||||
float tauntchance;
|
||||
@@ -1932,7 +1932,7 @@ void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) {
|
||||
|
||||
void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) {
|
||||
|
||||
if (who == NULL)
|
||||
if (who == nullptr)
|
||||
return;
|
||||
|
||||
if(DivineAura())
|
||||
@@ -1955,7 +1955,7 @@ void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) {
|
||||
}
|
||||
|
||||
//All values used based on live parses after taunt was updated in 2006.
|
||||
if ((hate_top && hate_top->GetHPRatio() >= 20) || hate_top == NULL) {
|
||||
if ((hate_top && hate_top->GetHPRatio() >= 20) || hate_top == nullptr) {
|
||||
|
||||
int32 newhate = 0;
|
||||
float tauntchance = 50.0f;
|
||||
@@ -2117,7 +2117,7 @@ void Mob::DoMeleeSkillAttackDmg(Mob* other, uint16 weapon_damage, SkillType skil
|
||||
|
||||
if(GetLevel() >= 28 && IsWarriorClass() )
|
||||
{
|
||||
int ucDamageBonus = GetWeaponDamageBonus((const Item_Struct*) NULL );
|
||||
int ucDamageBonus = GetWeaponDamageBonus((const Item_Struct*) nullptr );
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -2204,14 +2204,14 @@ bool Mob::CanDoSpecialAttack(Mob *other)
|
||||
{
|
||||
//Make sure everything is valid before doing any attacks.
|
||||
if (!other) {
|
||||
SetTarget(NULL);
|
||||
SetTarget(nullptr);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!GetTarget())
|
||||
SetTarget(other);
|
||||
|
||||
if ((other == NULL || ((IsClient() && CastToClient()->dead) || (other->IsClient() && other->CastToClient()->dead))
|
||||
if ((other == nullptr || ((IsClient() && CastToClient()->dead) || (other->IsClient() && other->CastToClient()->dead))
|
||||
|| HasDied() || (!IsAttackAllowed(other)))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+18
-18
@@ -48,7 +48,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
_ZP(Mob_SpellEffect);
|
||||
|
||||
int caster_level, buffslot, effect, effect_value, i;
|
||||
ItemInst *SummonedItem=NULL;
|
||||
ItemInst *SummonedItem=nullptr;
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
#define _EDLEN 200
|
||||
char effect_desc[_EDLEN];
|
||||
@@ -143,7 +143,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
{
|
||||
if(parse->SpellHasQuestSub(spell_id, "EVENT_SPELL_EFFECT_NPC"))
|
||||
{
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_NPC, CastToNPC(), NULL, spell_id, caster ? caster->GetID() : 0);
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_NPC, CastToNPC(), nullptr, spell_id, caster ? caster->GetID() : 0);
|
||||
CalcBonuses();
|
||||
return true;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
{
|
||||
if(parse->SpellHasQuestSub(spell_id, "EVENT_SPELL_EFFECT_CLIENT"))
|
||||
{
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_CLIENT, NULL, CastToClient(), spell_id, caster ? caster->GetID() : 0);
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_CLIENT, nullptr, CastToClient(), spell_id, caster ? caster->GetID() : 0);
|
||||
CalcBonuses();
|
||||
return true;
|
||||
}
|
||||
@@ -697,7 +697,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
caster->Message(0, "Unable to cast charm on a corpse.");
|
||||
BuffFadeByEffect(SE_Charm);
|
||||
break;
|
||||
} else if(caster->GetPet() != NULL && caster->IsClient()) {
|
||||
} else if(caster->GetPet() != nullptr && caster->IsClient()) {
|
||||
caster->Message(0, "You cannot charm something when you already have a pet.");
|
||||
BuffFadeByEffect(SE_Charm);
|
||||
break;
|
||||
@@ -1128,7 +1128,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
}
|
||||
charges = charges < 1 ? 1 : (charges > 20 ? 20 : charges);
|
||||
ItemInst *SubItem=database.CreateItem(spell.base[i],charges);
|
||||
if (SubItem!=NULL) {
|
||||
if (SubItem!=nullptr) {
|
||||
SummonedItem->PutItem(slot,*SubItem);
|
||||
safe_delete(SubItem);
|
||||
}
|
||||
@@ -1403,7 +1403,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
char eye_name[64];
|
||||
snprintf(eye_name, sizeof(eye_name), "Eye_of_%s", caster->GetCleanName());
|
||||
int duration = CalcBuffDuration(caster, this, spell_id) * 6;
|
||||
caster->TemporaryPets(spell_id, NULL, eye_name, duration);
|
||||
caster->TemporaryPets(spell_id, nullptr, eye_name, duration);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2030,7 +2030,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
caster->TemporaryPets(spell_id, this, pet_name);
|
||||
}
|
||||
else
|
||||
caster->TemporaryPets(spell_id, this, NULL);
|
||||
caster->TemporaryPets(spell_id, this, nullptr);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2114,11 +2114,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
switch(spells[spell_id].skill)
|
||||
{
|
||||
case THROWING:
|
||||
caster->DoThrowingAttackDmg(this, NULL, NULL, spells[spell_id].base[i],spells[spell_id].base2[i], focus);
|
||||
caster->DoThrowingAttackDmg(this, nullptr, nullptr, spells[spell_id].base[i],spells[spell_id].base2[i], focus);
|
||||
break;
|
||||
|
||||
case ARCHERY:
|
||||
caster->DoArcheryAttackDmg(this, NULL, NULL, spells[spell_id].base[i],spells[spell_id].base2[i],focus);
|
||||
caster->DoArcheryAttackDmg(this, nullptr, nullptr, spells[spell_id].base[i],spells[spell_id].base2[i],focus);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3070,7 +3070,7 @@ void Mob::DoBuffTic(uint16 spell_id, uint32 ticsremaining, uint8 caster_level, M
|
||||
{
|
||||
if(parse->SpellHasQuestSub(spell_id, "EVENT_SPELL_EFFECT_BUFF_TIC_NPC"))
|
||||
{
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_BUFF_TIC_NPC, CastToNPC(), NULL, spell_id, caster ? caster->GetID() : 0);
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_BUFF_TIC_NPC, CastToNPC(), nullptr, spell_id, caster ? caster->GetID() : 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3078,7 +3078,7 @@ void Mob::DoBuffTic(uint16 spell_id, uint32 ticsremaining, uint8 caster_level, M
|
||||
{
|
||||
if(parse->SpellHasQuestSub(spell_id, "EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT"))
|
||||
{
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT, NULL, CastToClient(), spell_id, caster ? caster->GetID() : 0);
|
||||
parse->EventSpell(EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT, nullptr, CastToClient(), spell_id, caster ? caster->GetID() : 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3590,7 +3590,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
{
|
||||
if(IsClient())
|
||||
{
|
||||
CastToClient()->SetBindSightTarget(NULL);
|
||||
CastToClient()->SetBindSightTarget(nullptr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3682,7 +3682,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
{
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket();
|
||||
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, NULL, true, false, BIT_SoDAndLater);
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, BIT_SoDAndLater);
|
||||
if(GetTarget() == this) {
|
||||
CastToClient()->QueuePacket(outapp);
|
||||
}
|
||||
@@ -4654,7 +4654,7 @@ int16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
|
||||
if (SizeProcList > MAX_SYMPATHETIC)
|
||||
continue;
|
||||
|
||||
TempItem = NULL;
|
||||
TempItem = nullptr;
|
||||
ItemInst* ins = GetInv().GetItem(x);
|
||||
if (!ins)
|
||||
continue;
|
||||
@@ -4675,7 +4675,7 @@ int16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
|
||||
if (SizeProcList > MAX_SYMPATHETIC)
|
||||
continue;
|
||||
|
||||
ItemInst *aug = NULL;
|
||||
ItemInst *aug = nullptr;
|
||||
aug = ins->GetAugment(y);
|
||||
if(aug)
|
||||
{
|
||||
@@ -4761,7 +4761,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) {
|
||||
//item focus
|
||||
for(int x=0; x<=21; x++)
|
||||
{
|
||||
TempItem = NULL;
|
||||
TempItem = nullptr;
|
||||
ItemInst* ins = GetInv().GetItem(x);
|
||||
if (!ins)
|
||||
continue;
|
||||
@@ -4795,7 +4795,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) {
|
||||
|
||||
for(int y = 0; y < MAX_AUGMENT_SLOTS; ++y)
|
||||
{
|
||||
ItemInst *aug = NULL;
|
||||
ItemInst *aug = nullptr;
|
||||
aug = ins->GetAugment(y);
|
||||
if(aug)
|
||||
{
|
||||
@@ -4833,7 +4833,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) {
|
||||
//Tribute Focus
|
||||
for(int x = TRIBUTE_SLOT_START; x < (TRIBUTE_SLOT_START + MAX_PLAYER_TRIBUTES); ++x)
|
||||
{
|
||||
TempItem = NULL;
|
||||
TempItem = nullptr;
|
||||
ItemInst* ins = GetInv().GetItem(x);
|
||||
if (!ins)
|
||||
continue;
|
||||
|
||||
+44
-44
@@ -320,9 +320,9 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
||||
{
|
||||
_ZP(Mob_DoCastSpell);
|
||||
|
||||
Mob* pMob = NULL;
|
||||
Mob* pMob = nullptr;
|
||||
int32 orgcasttime;
|
||||
EQApplicationPacket *outapp = NULL;
|
||||
EQApplicationPacket *outapp = nullptr;
|
||||
|
||||
if(!IsValidSpell(spell_id)) {
|
||||
InterruptSpell();
|
||||
@@ -465,7 +465,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
||||
outapp->priority = 3;
|
||||
entity_list.QueueCloseClients(this, outapp, false, 200, 0, true); //IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
safe_delete(outapp);
|
||||
outapp = NULL;
|
||||
outapp = nullptr;
|
||||
return(true);
|
||||
}
|
||||
|
||||
@@ -491,19 +491,19 @@ uint16 Mob::GetSpecializeSkillValue(uint16 spell_id) const {
|
||||
void Client::CheckSpecializeIncrease(uint16 spell_id) {
|
||||
switch(spells[spell_id].skill) {
|
||||
case ABJURE:
|
||||
CheckIncreaseSkill(SPECIALIZE_ABJURE, NULL);
|
||||
CheckIncreaseSkill(SPECIALIZE_ABJURE, nullptr);
|
||||
break;
|
||||
case ALTERATION:
|
||||
CheckIncreaseSkill(SPECIALIZE_ALTERATION, NULL);
|
||||
CheckIncreaseSkill(SPECIALIZE_ALTERATION, nullptr);
|
||||
break;
|
||||
case CONJURATION:
|
||||
CheckIncreaseSkill(SPECIALIZE_CONJURATION, NULL);
|
||||
CheckIncreaseSkill(SPECIALIZE_CONJURATION, nullptr);
|
||||
break;
|
||||
case DIVINATION:
|
||||
CheckIncreaseSkill(SPECIALIZE_DIVINATION, NULL);
|
||||
CheckIncreaseSkill(SPECIALIZE_DIVINATION, nullptr);
|
||||
break;
|
||||
case EVOCATION:
|
||||
CheckIncreaseSkill(SPECIALIZE_EVOCATION, NULL);
|
||||
CheckIncreaseSkill(SPECIALIZE_EVOCATION, nullptr);
|
||||
break;
|
||||
default:
|
||||
//wtf...
|
||||
@@ -515,47 +515,47 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
||||
switch(spells[spell_id].skill)
|
||||
{
|
||||
case SINGING:
|
||||
CheckIncreaseSkill(SINGING, NULL, -15);
|
||||
CheckIncreaseSkill(SINGING, nullptr, -15);
|
||||
break;
|
||||
case PERCUSSION_INSTRUMENTS:
|
||||
if(this->itembonuses.percussionMod > 0) {
|
||||
if(GetRawSkill(PERCUSSION_INSTRUMENTS) > 0) // no skill increases if not trained in the instrument
|
||||
CheckIncreaseSkill(PERCUSSION_INSTRUMENTS, NULL, -15);
|
||||
CheckIncreaseSkill(PERCUSSION_INSTRUMENTS, nullptr, -15);
|
||||
else
|
||||
Message_StringID(13,NO_INSTRUMENT_SKILL); // tell the client that they need instrument training
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(SINGING, NULL, -15);
|
||||
CheckIncreaseSkill(SINGING, nullptr, -15);
|
||||
break;
|
||||
case STRINGED_INSTRUMENTS:
|
||||
if(this->itembonuses.stringedMod > 0) {
|
||||
if(GetRawSkill(STRINGED_INSTRUMENTS) > 0)
|
||||
CheckIncreaseSkill(STRINGED_INSTRUMENTS, NULL, -15);
|
||||
CheckIncreaseSkill(STRINGED_INSTRUMENTS, nullptr, -15);
|
||||
else
|
||||
Message_StringID(13,NO_INSTRUMENT_SKILL);
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(SINGING, NULL, -15);
|
||||
CheckIncreaseSkill(SINGING, nullptr, -15);
|
||||
break;
|
||||
case WIND_INSTRUMENTS:
|
||||
if(this->itembonuses.windMod > 0) {
|
||||
if(GetRawSkill(WIND_INSTRUMENTS) > 0)
|
||||
CheckIncreaseSkill(WIND_INSTRUMENTS, NULL, -15);
|
||||
CheckIncreaseSkill(WIND_INSTRUMENTS, nullptr, -15);
|
||||
else
|
||||
Message_StringID(13,NO_INSTRUMENT_SKILL);
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(SINGING, NULL, -15);
|
||||
CheckIncreaseSkill(SINGING, nullptr, -15);
|
||||
break;
|
||||
case BRASS_INSTRUMENTS:
|
||||
if(this->itembonuses.brassMod > 0) {
|
||||
if(GetRawSkill(BRASS_INSTRUMENTS) > 0)
|
||||
CheckIncreaseSkill(BRASS_INSTRUMENTS, NULL, -15);
|
||||
CheckIncreaseSkill(BRASS_INSTRUMENTS, nullptr, -15);
|
||||
else
|
||||
Message_StringID(13,NO_INSTRUMENT_SKILL);
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(SINGING, NULL, -15);
|
||||
CheckIncreaseSkill(SINGING, nullptr, -15);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -860,7 +860,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot,
|
||||
bardsong = spell_id;
|
||||
bardsong_slot = slot;
|
||||
//NOTE: theres a lot more target types than this to think about...
|
||||
if (spell_target == NULL || (spells[spell_id].targettype != ST_Target && spells[spell_id].targettype != ST_AETarget))
|
||||
if (spell_target == nullptr || (spells[spell_id].targettype != ST_Target && spells[spell_id].targettype != ST_AETarget))
|
||||
bardsong_target_id = GetID();
|
||||
else
|
||||
bardsong_target_id = spell_target->GetID();
|
||||
@@ -1233,10 +1233,10 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot,
|
||||
// skills
|
||||
if(slot < MAX_PP_MEMSPELL)
|
||||
{
|
||||
c->CheckIncreaseSkill(spells[spell_id].skill, NULL);
|
||||
c->CheckIncreaseSkill(spells[spell_id].skill, nullptr);
|
||||
|
||||
// increased chance of gaining channel skill if you regained concentration
|
||||
c->CheckIncreaseSkill(CHANNELING, NULL, regain_conc ? 5 : 0);
|
||||
c->CheckIncreaseSkill(CHANNELING, nullptr, regain_conc ? 5 : 0);
|
||||
|
||||
c->CheckSpecializeIncrease(spell_id);
|
||||
}
|
||||
@@ -1291,7 +1291,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
bodyType mob_body = spell_target ? spell_target->GetBodyType() : BT_Humanoid;
|
||||
|
||||
if(IsPlayerIllusionSpell(spell_id)
|
||||
&& spell_target != NULL // null ptr crash safeguard
|
||||
&& spell_target != nullptr // null ptr crash safeguard
|
||||
&& !spell_target->IsNPC() // still self only if NPC targetted
|
||||
&& IsClient()
|
||||
&& (IsGrouped() // still self only if not grouped
|
||||
@@ -1462,7 +1462,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
case ST_AEBard:
|
||||
case ST_AECaster:
|
||||
{
|
||||
spell_target = NULL;
|
||||
spell_target = nullptr;
|
||||
ae_center = this;
|
||||
CastAction = AECaster;
|
||||
break;
|
||||
@@ -1470,7 +1470,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
|
||||
case ST_HateList:
|
||||
{
|
||||
spell_target = NULL;
|
||||
spell_target = nullptr;
|
||||
ae_center = this;
|
||||
CastAction = CAHateList;
|
||||
break;
|
||||
@@ -1632,13 +1632,13 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
|
||||
case ST_Directional:
|
||||
CastAction = DirectionalAE;
|
||||
spell_target = NULL;
|
||||
ae_center = NULL;
|
||||
spell_target = nullptr;
|
||||
ae_center = nullptr;
|
||||
break;
|
||||
|
||||
case ST_TargetsTarget:
|
||||
{
|
||||
Mob *spell_target_tot = spell_target ? spell_target->GetTarget() : NULL;
|
||||
Mob *spell_target_tot = spell_target ? spell_target->GetTarget() : nullptr;
|
||||
if(!spell_target_tot)
|
||||
return false;
|
||||
//Verfied from live - Target's Target needs to be in combat range to recieve the effect
|
||||
@@ -1669,8 +1669,8 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
{
|
||||
_ZP(Mob_SpellFinished);
|
||||
|
||||
//EQApplicationPacket *outapp = NULL;
|
||||
Mob *ae_center = NULL;
|
||||
//EQApplicationPacket *outapp = nullptr;
|
||||
Mob *ae_center = nullptr;
|
||||
|
||||
if(!IsValidSpell(spell_id))
|
||||
return false;
|
||||
@@ -1746,7 +1746,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
Beacon *beacon = new Beacon(beacon_loc, spells[spell_id].AEDuration);
|
||||
entity_list.AddBeacon(beacon);
|
||||
mlog(SPELLS__CASTING, "Spell %d: AE duration beacon created, entity id %d", spell_id, beacon->GetName());
|
||||
spell_target = NULL;
|
||||
spell_target = nullptr;
|
||||
ae_center = beacon;
|
||||
CastAction = AECaster;
|
||||
}
|
||||
@@ -1778,7 +1778,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
&& CastToClient()->CheckAAEffect(aaEffectProjectIllusion)){
|
||||
range = 100;
|
||||
}
|
||||
if(spell_target != NULL && spell_target != this) {
|
||||
if(spell_target != nullptr && spell_target != this) {
|
||||
//casting a spell on somebody but ourself, make sure they are in range
|
||||
float dist2 = DistNoRoot(*spell_target);
|
||||
float range2 = range * range;
|
||||
@@ -1810,7 +1810,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
}
|
||||
#endif //BOTS
|
||||
|
||||
if(spell_target == NULL) {
|
||||
if(spell_target == nullptr) {
|
||||
mlog(SPELLS__CASTING, "Spell %d: Targeted spell, but we have no target", spell_id);
|
||||
return(false);
|
||||
}
|
||||
@@ -1845,7 +1845,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
#endif //BOTS
|
||||
|
||||
// we can't cast an AE spell without something to center it on
|
||||
assert(ae_center != NULL);
|
||||
assert(ae_center != nullptr);
|
||||
|
||||
if(ae_center->IsBeacon()) {
|
||||
// special ae duration spell
|
||||
@@ -2070,14 +2070,14 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot) {
|
||||
}
|
||||
|
||||
//determine the type of spell target we have
|
||||
Mob *ae_center = NULL;
|
||||
Mob *ae_center = nullptr;
|
||||
CastAction_type CastAction;
|
||||
if(!DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction)) {
|
||||
mlog(SPELLS__BARDS, "Bard Song Pulse %d: was unable to determine target. Stopping.", spell_id);
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(ae_center != NULL && ae_center->IsBeacon()) {
|
||||
if(ae_center != nullptr && ae_center->IsBeacon()) {
|
||||
mlog(SPELLS__BARDS, "Bard Song Pulse %d: Unsupported Beacon NPC AE spell", spell_id);
|
||||
return(false);
|
||||
}
|
||||
@@ -2108,7 +2108,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot) {
|
||||
float range = 0.00f;
|
||||
|
||||
range = GetActSpellRange(spell_id, spells[spell_id].range, true);
|
||||
if(spell_target != NULL && spell_target != this) {
|
||||
if(spell_target != nullptr && spell_target != this) {
|
||||
//casting a spell on somebody but ourself, make sure they are in range
|
||||
float dist2 = DistNoRoot(*spell_target);
|
||||
float range2 = range * range;
|
||||
@@ -2129,7 +2129,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot) {
|
||||
case CastActUnknown:
|
||||
case SingleTarget:
|
||||
{
|
||||
if(spell_target == NULL) {
|
||||
if(spell_target == nullptr) {
|
||||
mlog(SPELLS__BARDS, "Bard Song Pulse %d: Targeted spell, but we have no target", spell_id);
|
||||
return(false);
|
||||
}
|
||||
@@ -2150,7 +2150,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot) {
|
||||
case AETarget:
|
||||
{
|
||||
// we can't cast an AE spell without something to center it on
|
||||
if(ae_center == NULL) {
|
||||
if(ae_center == nullptr) {
|
||||
mlog(SPELLS__BARDS, "Bard Song Pulse %d: AE Targeted spell, but we have no target", spell_id);
|
||||
return(false);
|
||||
}
|
||||
@@ -2468,7 +2468,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
int blocked_effect, blocked_below_value, blocked_slot;
|
||||
int overwrite_effect, overwrite_below_value, overwrite_slot;
|
||||
|
||||
mlog(SPELLS__STACKING, "Check Stacking on old %s (%d) @ lvl %d (by %s) vs. new %s (%d) @ lvl %d (by %s)", sp1.name, spellid1, caster_level1, (caster1==NULL)?"Nobody":caster1->GetName(), sp2.name, spellid2, caster_level2, (caster2==NULL)?"Nobody":caster2->GetName());
|
||||
mlog(SPELLS__STACKING, "Check Stacking on old %s (%d) @ lvl %d (by %s) vs. new %s (%d) @ lvl %d (by %s)", sp1.name, spellid1, caster_level1, (caster1==nullptr)?"Nobody":caster1->GetName(), sp2.name, spellid2, caster_level2, (caster2==nullptr)?"Nobody":caster2->GetName());
|
||||
|
||||
if(((spellid1 == spellid2) && (spellid1 == 2751)) || //special case spells that will block each other no matter what
|
||||
((spellid1 == spellid2) && (spellid1 == 2755)) //manaburn / lifeburn
|
||||
@@ -2882,7 +2882,7 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid
|
||||
{
|
||||
EQApplicationPacket *outapp = MakeBuffsPacket();
|
||||
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, NULL, true, false, BIT_SoDAndLater);
|
||||
entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, BIT_SoDAndLater);
|
||||
|
||||
if(GetTarget() == this) {
|
||||
CastToClient()->QueuePacket(outapp);
|
||||
@@ -3741,7 +3741,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
_ZP(Mob_IsImmuneToSpell);
|
||||
int effect_index;
|
||||
|
||||
if(caster == NULL)
|
||||
if(caster == nullptr)
|
||||
return(false);
|
||||
|
||||
//TODO: this function loops through the effect list for
|
||||
@@ -4867,7 +4867,7 @@ uint16 Mob::FindSpell(uint16 classp, uint16 level, uint8 type, uint8 spelltype)
|
||||
uint16 bestsofar = 0;
|
||||
uint16 bestspellid = 0;
|
||||
for (int i = 0; i < SPDAT_RECORDS; i++) {
|
||||
if ((IsLifetapSpell(i) && spelltype == 1) || (spells[i].targettype != ST_Group && spells[i].targettype != ST_Undead && spells[i].targettype != ST_Summoned && spells[i].targettype != ST_Pet && strstr(spells[i].name,"Summoning") == NULL)) {
|
||||
if ((IsLifetapSpell(i) && spelltype == 1) || (spells[i].targettype != ST_Group && spells[i].targettype != ST_Undead && spells[i].targettype != ST_Summoned && spells[i].targettype != ST_Pet && strstr(spells[i].name,"Summoning") == nullptr)) {
|
||||
int Canuse = CanUseSpell(i, classp, level);
|
||||
if (Canuse != 0) {
|
||||
for (int z=0; z < 12; z++) {
|
||||
@@ -5328,7 +5328,7 @@ EQApplicationPacket *Mob::MakeBuffsPacket(bool for_target)
|
||||
}
|
||||
}
|
||||
|
||||
EQApplicationPacket* outapp = NULL;
|
||||
EQApplicationPacket* outapp = nullptr;
|
||||
|
||||
//Create it for a targeting window, else create it for a create buff packet.
|
||||
if(for_target)
|
||||
@@ -5443,7 +5443,7 @@ void Client::InitializeBuffSlots()
|
||||
buffs[x].spellid = SPELL_UNKNOWN;
|
||||
}
|
||||
current_buff_count = 0;
|
||||
buff_tic_timer = NULL;
|
||||
buff_tic_timer = nullptr;
|
||||
}
|
||||
|
||||
void Client::UninitializeBuffSlots()
|
||||
@@ -5460,7 +5460,7 @@ void NPC::InitializeBuffSlots()
|
||||
buffs[x].spellid = SPELL_UNKNOWN;
|
||||
}
|
||||
current_buff_count = 0;
|
||||
buff_tic_timer = NULL;
|
||||
buff_tic_timer = nullptr;
|
||||
}
|
||||
|
||||
void NPC::UninitializeBuffSlots()
|
||||
|
||||
+40
-40
@@ -37,7 +37,7 @@ Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net)
|
||||
TaskManager::TaskManager() {
|
||||
|
||||
for(int i=0; i<MAXTASKS; i++)
|
||||
Tasks[i] = NULL;
|
||||
Tasks[i] = nullptr;
|
||||
|
||||
|
||||
}
|
||||
@@ -45,7 +45,7 @@ TaskManager::TaskManager() {
|
||||
TaskManager::~TaskManager() {
|
||||
|
||||
for(int i=0; i<MAXTASKS; i++) {
|
||||
if(Tasks[i] != NULL) {
|
||||
if(Tasks[i] != nullptr) {
|
||||
for(int j=0; j<Tasks[i]->ActivityCount; j++) {
|
||||
safe_delete_array(Tasks[i]->Activity[j].Text1);
|
||||
safe_delete_array(Tasks[i]->Activity[j].Text2);
|
||||
@@ -247,7 +247,7 @@ bool TaskManager::LoadTasks(int SingleTask) {
|
||||
LogFile->write(EQEMuLog::Error, ERR_TASK_OR_ACTIVITY_OOR, TaskID, ActivityID);
|
||||
continue;
|
||||
}
|
||||
if(Tasks[TaskID]==NULL) {
|
||||
if(Tasks[TaskID]==nullptr) {
|
||||
LogFile->write(EQEMuLog::Error, ERR_NOTASK, TaskID, ActivityID);
|
||||
continue;
|
||||
}
|
||||
@@ -259,12 +259,12 @@ bool TaskManager::LoadTasks(int SingleTask) {
|
||||
if(Step >Tasks[TaskID]->LastStep) Tasks[TaskID]->LastStep = Step;
|
||||
|
||||
// Task Activities MUST be numbered sequentially from 0. If not, log an error
|
||||
// and set the task to NULL. Subsequent activities for this task will raise
|
||||
// and set the task to nullptr. Subsequent activities for this task will raise
|
||||
// ERR_NOTASK errors.
|
||||
// Change to (ActivityID != (Tasks[TaskID]->ActivityCount + 1)) to index from 1
|
||||
if(ActivityID != Tasks[TaskID]->ActivityCount) {
|
||||
LogFile->write(EQEMuLog::Error, ERR_SEQERR, TaskID, ActivityID);
|
||||
Tasks[TaskID] = NULL;
|
||||
Tasks[TaskID] = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
_log(TASKS__CLIENTSAVE, "TaskManager::SaveClientState Saving Completed Task at slot %i", i);
|
||||
int TaskID = state->CompletedTasks[i].TaskID;
|
||||
if((TaskID<=0) || (TaskID>=MAXTASKS) || (Tasks[TaskID]==NULL)) continue;
|
||||
if((TaskID<=0) || (TaskID>=MAXTASKS) || (Tasks[TaskID]==nullptr)) continue;
|
||||
|
||||
// First we save a record with an ActivityID of -1.
|
||||
// This indicates this task was completed at the given time. We infer that all
|
||||
@@ -716,7 +716,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
// If ActivityID is -1, Mark all the non-optional tasks as completed.
|
||||
if(ActivityID < 0) {
|
||||
TaskInformation* Task = Tasks[TaskID];
|
||||
if(Task == NULL) continue;
|
||||
if(Task == nullptr) continue;
|
||||
|
||||
for(int i=0; i<Task->ActivityCount; i++)
|
||||
if(!Task->Activity[i].Optional)
|
||||
@@ -1050,7 +1050,7 @@ int TaskManager::NextTaskInSet(int TaskSetID, int TaskID) {
|
||||
|
||||
bool TaskManager::AppropriateLevel(int TaskID, int PlayerLevel) {
|
||||
|
||||
if(Tasks[TaskID] == NULL) return false;
|
||||
if(Tasks[TaskID] == nullptr) return false;
|
||||
|
||||
if(Tasks[TaskID]->MinLevel && (PlayerLevel < Tasks[TaskID]->MinLevel)) return false;
|
||||
|
||||
@@ -1155,10 +1155,10 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task
|
||||
|
||||
for(int i=0; i<TaskCount; i++) {
|
||||
|
||||
if(Tasks[TaskList[i]] != NULL) break;
|
||||
if(Tasks[TaskList[i]] != nullptr) break;
|
||||
}
|
||||
|
||||
// FIXME: The 10 and 5 values in this calculation are to account for the string "NULL" we are putting in 3 times.
|
||||
// FIXME: The 10 and 5 values in this calculation are to account for the string "nullptr" we are putting in 3 times.
|
||||
//
|
||||
// Calculate how big the packet needs to be pased on the number of tasks and the
|
||||
// size of the variable length strings.
|
||||
@@ -1236,9 +1236,9 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task
|
||||
// FIXME: In live packets, these two strings appear to be the same as the Text1 and Text2
|
||||
// strings from the first activity in the task, however the task chooser/selector
|
||||
// does not appear to make use of them.
|
||||
sprintf(Ptr, "NULL");
|
||||
sprintf(Ptr, "nullptr");
|
||||
Ptr = Ptr + strlen(Ptr) + 1;
|
||||
sprintf(Ptr, "NULL");
|
||||
sprintf(Ptr, "nullptr");
|
||||
Ptr = Ptr + strlen(Ptr) + 1;
|
||||
|
||||
AvailableTaskTrailer = (AvailableTaskTrailer_Struct*)Ptr;
|
||||
@@ -1253,7 +1253,7 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task
|
||||
|
||||
// In some packets, this next string looks like a short task summary, however it doesn't
|
||||
// appear anywhere in the client window.
|
||||
sprintf(Ptr, "NULL");
|
||||
sprintf(Ptr, "nullptr");
|
||||
Ptr = Ptr + strlen(Ptr) + 1;
|
||||
}
|
||||
|
||||
@@ -1273,7 +1273,7 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T
|
||||
// Check if any of the tasks exist
|
||||
for(int i=0; i<TaskCount; i++)
|
||||
{
|
||||
if(Tasks[TaskList[i]] != NULL) break;
|
||||
if(Tasks[TaskList[i]] != nullptr) break;
|
||||
}
|
||||
|
||||
int PacketLength = 12; // Header
|
||||
@@ -1389,7 +1389,7 @@ void TaskManager::ExplainTask(Client*c, int TaskID) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(Tasks[TaskID] == NULL) {
|
||||
if(Tasks[TaskID] == nullptr) {
|
||||
c->Message(0, "Task does not exist.");
|
||||
return;
|
||||
}
|
||||
@@ -1459,7 +1459,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[TaskIndex].TaskID];
|
||||
|
||||
if(Task==NULL) return true;
|
||||
if(Task==nullptr) return true;
|
||||
|
||||
// On loading the client state, all activities that are not completed, are
|
||||
// marked as hidden. For Sequential (non-stepped) mode, we mark the first
|
||||
@@ -1508,7 +1508,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
|
||||
CompletedTaskInformation cti;
|
||||
cti.TaskID = ActiveTasks[TaskIndex].TaskID;
|
||||
cti.CompletedTime = time(NULL);
|
||||
cti.CompletedTime = time(nullptr);
|
||||
|
||||
for(int i=0; i<Task->ActivityCount; i++)
|
||||
cti.ActivityDone[i] = (ActiveTasks[TaskIndex].Activity[i].State == ActivityCompleted);
|
||||
@@ -1580,7 +1580,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
}
|
||||
CompletedTaskInformation cti;
|
||||
cti.TaskID = ActiveTasks[TaskIndex].TaskID;
|
||||
cti.CompletedTime = time(NULL);
|
||||
cti.CompletedTime = time(nullptr);
|
||||
|
||||
for(int i=0; i<Task->ActivityCount; i++)
|
||||
cti.ActivityDone[i] = (ActiveTasks[TaskIndex].Activity[i].State == ActivityCompleted);
|
||||
@@ -1634,7 +1634,7 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) return false;
|
||||
if(Task == nullptr) return false;
|
||||
|
||||
for(int j=0; j<Task->ActivityCount; j++) {
|
||||
// We are not interested in completed or hidden activities
|
||||
@@ -1685,7 +1685,7 @@ int ClientTaskState::ActiveSpeakTask(int NPCTypeID) {
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) continue;
|
||||
if(Task == nullptr) continue;
|
||||
|
||||
for(int j=0; j<Task->ActivityCount; j++) {
|
||||
// We are not interested in completed or hidden activities
|
||||
@@ -1716,7 +1716,7 @@ int ClientTaskState::ActiveSpeakActivity(int NPCTypeID, int TaskID) {
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) continue;
|
||||
if(Task == nullptr) continue;
|
||||
|
||||
for(int j=0; j<Task->ActivityCount; j++) {
|
||||
// We are not interested in completed or hidden activities
|
||||
@@ -1754,7 +1754,7 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) return;
|
||||
if(Task == nullptr) return;
|
||||
|
||||
for(int j=0; j<Task->ActivityCount; j++) {
|
||||
// We are not interested in completed or hidden activities
|
||||
@@ -1806,7 +1806,7 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) {
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) return;
|
||||
if(Task == nullptr) return;
|
||||
|
||||
for(int j=0; j<Task->ActivityCount; j++) {
|
||||
// We are not interested in completed or hidden activities
|
||||
@@ -1861,7 +1861,7 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, uint32 *Items, int Cash, i
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) return false;
|
||||
if(Task == nullptr) return false;
|
||||
|
||||
for(int j=0; j<Task->ActivityCount; j++) {
|
||||
// We are not interested in completed or hidden activities
|
||||
@@ -1929,7 +1929,7 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) {
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) return;
|
||||
if(Task == nullptr) return;
|
||||
|
||||
for(int j=0; j<Task->ActivityCount; j++) {
|
||||
// We are not interested in completed or hidden activities
|
||||
@@ -2179,7 +2179,7 @@ bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) {
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[ActiveTaskIndex].TaskID];
|
||||
|
||||
// The task is invalid
|
||||
if(Task==NULL) return false;
|
||||
if(Task==nullptr) return false;
|
||||
|
||||
// The ActivityID is out of range
|
||||
if(ActivityID >= Task->ActivityCount) return false;
|
||||
@@ -2214,7 +2214,7 @@ void ClientTaskState::UpdateTaskActivity(Client *c, int TaskID, int ActivityID,
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[ActiveTaskIndex].TaskID];
|
||||
|
||||
// The task is invalid
|
||||
if(Task==NULL) return;
|
||||
if(Task==nullptr) return;
|
||||
|
||||
// The ActivityID is out of range
|
||||
if(ActivityID >= Task->ActivityCount) return;
|
||||
@@ -2248,7 +2248,7 @@ void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) {
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[ActiveTaskIndex].TaskID];
|
||||
|
||||
// The task is invalid
|
||||
if(Task==NULL) return;
|
||||
if(Task==nullptr) return;
|
||||
|
||||
// The ActivityID is out of range
|
||||
if(ActivityID >= Task->ActivityCount) return;
|
||||
@@ -2295,11 +2295,11 @@ int ClientTaskState::TaskTimeLeft(int TaskID) {
|
||||
|
||||
if(ActiveTasks[i].TaskID != TaskID) continue;
|
||||
|
||||
int Now = time(NULL);
|
||||
int Now = time(nullptr);
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
if(Task == NULL) return -1;
|
||||
if(Task == nullptr) return -1;
|
||||
|
||||
if(!Task->Duration) return -1;
|
||||
|
||||
@@ -2335,7 +2335,7 @@ bool TaskManager::IsTaskRepeatable(int TaskID) {
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[TaskID];
|
||||
|
||||
if(Task == NULL) return false;
|
||||
if(Task == nullptr) return false;
|
||||
|
||||
return Task->Repeatable;
|
||||
}
|
||||
@@ -2348,11 +2348,11 @@ bool ClientTaskState::TaskOutOfTime(int Index) {
|
||||
|
||||
if((ActiveTasks[Index].TaskID <= 0) || (ActiveTasks[Index].TaskID >= MAXTASKS)) return false;
|
||||
|
||||
int Now = time(NULL);
|
||||
int Now = time(nullptr);
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[Index].TaskID];
|
||||
|
||||
if(Task == NULL) return false;
|
||||
if(Task == nullptr) return false;
|
||||
|
||||
return (Task->Duration && (ActiveTasks[Index].AcceptedTime + Task->Duration <= Now));
|
||||
|
||||
@@ -2441,7 +2441,7 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) {
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[TaskID];
|
||||
|
||||
if(Task == NULL) return;
|
||||
if(Task == nullptr) return;
|
||||
|
||||
TaskHistoryReplyHeader_Struct* ths;
|
||||
TaskHistoryReplyData1_Struct* thd1;
|
||||
@@ -2585,13 +2585,13 @@ void TaskManager::SendCompletedTasksToClient(Client *c, ClientTaskState *State)
|
||||
/*
|
||||
for(iterator=State->CompletedTasks.begin(); iterator!=State->CompletedTasks.end(); iterator++) {
|
||||
int TaskID = (*iterator).TaskID;
|
||||
if(Tasks[TaskID] == NULL) continue;
|
||||
if(Tasks[TaskID] == nullptr) continue;
|
||||
PacketLength = PacketLength + 8 + strlen(Tasks[TaskID]->Title) + 1;
|
||||
}
|
||||
*/
|
||||
for(int i = FirstTaskToSend; i<LastTaskToSend; i++) {
|
||||
int TaskID = State->CompletedTasks[i].TaskID;
|
||||
if(Tasks[TaskID] == NULL) continue;
|
||||
if(Tasks[TaskID] == nullptr) continue;
|
||||
PacketLength = PacketLength + 8 + strlen(Tasks[TaskID]->Title) + 1;
|
||||
}
|
||||
|
||||
@@ -2605,7 +2605,7 @@ void TaskManager::SendCompletedTasksToClient(Client *c, ClientTaskState *State)
|
||||
// int TaskID = (*iterator).TaskID;
|
||||
for(int i = FirstTaskToSend; i<LastTaskToSend; i++) {
|
||||
int TaskID = State->CompletedTasks[i].TaskID;
|
||||
if(Tasks[TaskID] == NULL) continue;
|
||||
if(Tasks[TaskID] == nullptr) continue;
|
||||
*(uint32 *)buf = TaskID;
|
||||
buf = buf + 4;
|
||||
|
||||
@@ -3184,7 +3184,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID) {
|
||||
|
||||
}
|
||||
|
||||
if(taskmanager->Tasks[TaskID] == NULL) {
|
||||
if(taskmanager->Tasks[TaskID] == nullptr) {
|
||||
c->Message(13, "Invalid TaskID %i", TaskID);
|
||||
return;
|
||||
}
|
||||
@@ -3226,7 +3226,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID) {
|
||||
|
||||
|
||||
ActiveTasks[FreeSlot].TaskID = TaskID;
|
||||
ActiveTasks[FreeSlot].AcceptedTime = time(NULL);
|
||||
ActiveTasks[FreeSlot].AcceptedTime = time(nullptr);
|
||||
ActiveTasks[FreeSlot].Updated = true;
|
||||
ActiveTasks[FreeSlot].CurrentStep = -1;
|
||||
|
||||
@@ -3280,7 +3280,7 @@ void ClientTaskState::ProcessTaskProximities(Client *c, float X, float Y, float
|
||||
|
||||
TaskGoalListManager::TaskGoalListManager() {
|
||||
|
||||
TaskGoalLists = NULL;
|
||||
TaskGoalLists = nullptr;
|
||||
NumberOfLists = 0;
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ bool TitleManager::LoadTitles()
|
||||
TitleEntry Title;
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = NULL;
|
||||
char *query = nullptr;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
@@ -252,7 +252,7 @@ void TitleManager::CreateNewPlayerTitle(Client *c, const char *Title)
|
||||
return;
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = NULL;
|
||||
char *query = nullptr;
|
||||
MYSQL_RES *result;
|
||||
|
||||
char *EscTitle = new char[strlen(Title) * 2 + 1];
|
||||
@@ -296,7 +296,7 @@ void TitleManager::CreateNewPlayerSuffix(Client *c, const char *Suffix)
|
||||
return;
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = NULL;
|
||||
char *query = nullptr;
|
||||
MYSQL_RES *result;
|
||||
|
||||
char *EscSuffix = new char[strlen(Suffix) * 2 + 1];
|
||||
|
||||
+17
-17
@@ -44,7 +44,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
return;
|
||||
}
|
||||
|
||||
ItemInst* container = NULL;
|
||||
ItemInst* container = nullptr;
|
||||
|
||||
if (worldo)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
{
|
||||
// Check to see if they have an inventory container type 53 that is used for this.
|
||||
Inventory& user_inv = user->GetInv();
|
||||
ItemInst* inst = NULL;
|
||||
ItemInst* inst = nullptr;
|
||||
|
||||
inst = user_inv.GetItem(in_augment->container_slot);
|
||||
if (inst)
|
||||
@@ -92,7 +92,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
return;
|
||||
}
|
||||
|
||||
ItemInst *tobe_auged, *auged_with = NULL;
|
||||
ItemInst *tobe_auged, *auged_with = nullptr;
|
||||
int8 slot=-1;
|
||||
|
||||
// Verify 2 items in the augmentation device
|
||||
@@ -133,7 +133,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
|
||||
bool deleteItems = false;
|
||||
|
||||
ItemInst *itemOneToPush = NULL, *itemTwoToPush = NULL;
|
||||
ItemInst *itemOneToPush = nullptr, *itemTwoToPush = nullptr;
|
||||
|
||||
// Adding augment
|
||||
if (in_augment->augment_slot == -1)
|
||||
@@ -151,7 +151,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemInst *old_aug=NULL;
|
||||
ItemInst *old_aug=nullptr;
|
||||
const uint32 id=auged_with->GetID();
|
||||
if (id==40408 || id==40409 || id==40410)
|
||||
tobe_auged->DeleteAugment(in_augment->augment_slot);
|
||||
@@ -215,8 +215,8 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
||||
|
||||
Inventory& user_inv = user->GetInv();
|
||||
PlayerProfile_Struct& user_pp = user->GetPP();
|
||||
ItemInst* container = NULL;
|
||||
ItemInst* inst = NULL;
|
||||
ItemInst* container = nullptr;
|
||||
ItemInst* inst = nullptr;
|
||||
uint8 c_type = 0xE8;
|
||||
uint32 some_id = 0;
|
||||
bool worldcontainer=false;
|
||||
@@ -634,7 +634,7 @@ void Client::TradeskillSearchResults(const char *query, unsigned long qlen,
|
||||
uint8 r;
|
||||
for(r = 0; r < qcount; r++) {
|
||||
row = mysql_fetch_row(result);
|
||||
if(row == NULL || row[0] == NULL || row[1] == NULL || row[2] == NULL || row[3] == NULL || row[5] == NULL)
|
||||
if(row == nullptr || row[0] == nullptr || row[1] == nullptr || row[2] == nullptr || row[3] == nullptr || row[5] == nullptr)
|
||||
continue;
|
||||
uint32 recipe = (uint32)atoi(row[0]);
|
||||
const char *name = row[1];
|
||||
@@ -647,7 +647,7 @@ void Client::TradeskillSearchResults(const char *query, unsigned long qlen,
|
||||
// explicitly learned are excempt from that limit
|
||||
if (RuleB(Skills, UseLimitTradeskillSearchSkillDiff)) {
|
||||
if (((int32)trivial - (int32)GetSkill((SkillType)tradeskill)) > RuleI(Skills, MaxTradeskillSearchSkillDiff)
|
||||
&& row[4] == NULL)
|
||||
&& row[4] == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -731,8 +731,8 @@ void Client::SendTradeskillDetails(uint32 recipe_id) {
|
||||
row = mysql_fetch_row(result);
|
||||
|
||||
//watch for references to items which are not in the
|
||||
//items table, which the left join will make NULL...
|
||||
if(row[2] == NULL || row[3] == NULL) {
|
||||
//items table, which the left join will make nullptr...
|
||||
if(row[2] == nullptr || row[3] == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -789,7 +789,7 @@ void Client::SendTradeskillDetails(uint32 recipe_id) {
|
||||
|
||||
//returns true on success
|
||||
bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
if(spec == NULL)
|
||||
if(spec == nullptr)
|
||||
return(false);
|
||||
|
||||
uint16 user_skill = GetSkill(spec->tradeskill);
|
||||
@@ -916,7 +916,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
const Item_Struct* item = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
|
||||
if (spec->tradeskill == BLACKSMITHING) {
|
||||
switch(GetAA(aaBlacksmithingMastery)) {
|
||||
@@ -1288,7 +1288,7 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
|
||||
MYSQL_RES *TSresult;
|
||||
MYSQL_ROW TSrow;
|
||||
if (RunQuery(TSquery, MakeAnyLenString(&TSquery, "SELECT item_id, componentcount from tradeskill_recipe_entries where recipe_id=%i AND componentcount > 0", recipe_id), TSerrbuf, &TSresult)) {
|
||||
while((TSrow = mysql_fetch_row(TSresult))!=NULL) {
|
||||
while((TSrow = mysql_fetch_row(TSresult))!=nullptr) {
|
||||
int ccnt = 0;
|
||||
for(int x = 0; x < 10; x++){
|
||||
const ItemInst* inst = container->GetItem(x);
|
||||
@@ -1370,7 +1370,7 @@ bool ZoneDatabase::GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint32 some_id
|
||||
spec->name = row[6];
|
||||
spec->must_learn = (uint8)atoi(row[7]);
|
||||
spec->quest = atoi(row[8]) ? true : false;
|
||||
if (row[9] == NULL) {
|
||||
if (row[9] == nullptr) {
|
||||
spec->has_learnt = false;
|
||||
spec->madecount = 0;
|
||||
} else {
|
||||
@@ -1496,9 +1496,9 @@ void Client::LearnRecipe(uint32 recipeID)
|
||||
|
||||
row = mysql_fetch_row(result);
|
||||
|
||||
if (row != NULL && row[0] != NULL) {
|
||||
if (row != nullptr && row[0] != nullptr) {
|
||||
// Only give Learn message if character doesn't know the recipe
|
||||
if (row[1] == NULL) {
|
||||
if (row[1] == nullptr) {
|
||||
Message_StringID(4, TRADESKILL_LEARN_RECIPE, row[0]);
|
||||
// Actually learn the recipe now
|
||||
qlen = MakeAnyLenString(&query, "INSERT INTO char_recipe_list "
|
||||
|
||||
+18
-18
@@ -272,7 +272,7 @@ void Trade::DumpTrade()
|
||||
{
|
||||
Mob* with = With();
|
||||
LogFile->write(EQEMuLog::Debug, "Dumping trade data: '%s' in TradeState %i with '%s'",
|
||||
this->owner->GetName(), state, ((with==NULL)?"(null)":with->GetName()));
|
||||
this->owner->GetName(), state, ((with==nullptr)?"(null)":with->GetName()));
|
||||
|
||||
if (!owner->IsClient())
|
||||
return;
|
||||
@@ -341,8 +341,8 @@ void Client::FinishTrade(Mob* tradingWith, ServerPacket* qspack, bool finalizer)
|
||||
mlog(TRADING__CLIENT, "Finishing trade with client %s", other->GetName());
|
||||
|
||||
int16 slot_id;
|
||||
const Item_Struct* item = NULL;
|
||||
QSPlayerLogTrade_Struct* qsaudit = NULL;
|
||||
const Item_Struct* item = nullptr;
|
||||
QSPlayerLogTrade_Struct* qsaudit = nullptr;
|
||||
bool QSPLT = false;
|
||||
|
||||
// QS code
|
||||
@@ -359,7 +359,7 @@ void Client::FinishTrade(Mob* tradingWith, ServerPacket* qspack, bool finalizer)
|
||||
const ItemInst* inst = m_inv[i];
|
||||
uint16 parent_offset = 0;
|
||||
|
||||
if(inst == NULL) { continue; }
|
||||
if(inst == nullptr) { continue; }
|
||||
|
||||
mlog(TRADING__CLIENT, "Giving %s (%d) in slot %d to %s", inst->GetItem()->Name, inst->GetItem()->ID, i, other->GetName());
|
||||
|
||||
@@ -388,7 +388,7 @@ void Client::FinishTrade(Mob* tradingWith, ServerPacket* qspack, bool finalizer)
|
||||
for(uint8 j = 0; j < inst->GetItem()->BagSlots; j++) {
|
||||
const ItemInst* baginst = inst->GetItem(j);
|
||||
|
||||
if(baginst == NULL) { continue; }
|
||||
if(baginst == nullptr) { continue; }
|
||||
|
||||
int16 k=Inventory::CalcSlotId(i, j);
|
||||
item_count = qsaudit->char1_count + qsaudit->char2_count;
|
||||
@@ -427,7 +427,7 @@ void Client::FinishTrade(Mob* tradingWith, ServerPacket* qspack, bool finalizer)
|
||||
for(uint8 bagslot_idx = 0; bagslot_idx < inst->GetItem()->BagSlots; bagslot_idx++) {
|
||||
const ItemInst* bag_inst = inst->GetItem(bagslot_idx);
|
||||
|
||||
if(bag_inst == NULL) { continue; }
|
||||
if(bag_inst == nullptr) { continue; }
|
||||
int16 to_bagslot_id = Inventory::CalcSlotId(slot_id, bagslot_idx);
|
||||
|
||||
qsaudit->items[++parent_offset].to_slot = to_bagslot_id;
|
||||
@@ -447,7 +447,7 @@ void Client::FinishTrade(Mob* tradingWith, ServerPacket* qspack, bool finalizer)
|
||||
for(uint8 bagslot_idx = 0; bagslot_idx < inst->GetItem()->BagSlots; bagslot_idx++) {
|
||||
const ItemInst* bag_inst = inst->GetItem(bagslot_idx);
|
||||
|
||||
if(bag_inst == NULL) { continue; }
|
||||
if(bag_inst == nullptr) { continue; }
|
||||
int16 to_bagslot_id = Inventory::CalcSlotId(SLOT_CURSOR, bagslot_idx);
|
||||
|
||||
qsaudit->items[++parent_offset].to_id = this->character_id;
|
||||
@@ -471,7 +471,7 @@ void Client::FinishTrade(Mob* tradingWith, ServerPacket* qspack, bool finalizer)
|
||||
for(uint8 bagslot_idx = 0; bagslot_idx < inst->GetItem()->BagSlots; bagslot_idx++) {
|
||||
const ItemInst* bag_inst = inst->GetItem(bagslot_idx);
|
||||
|
||||
if(bag_inst == NULL) { continue; }
|
||||
if(bag_inst == nullptr) { continue; }
|
||||
int16 to_bagslot_id = Inventory::CalcSlotId(SLOT_CURSOR, bagslot_idx);
|
||||
|
||||
qsaudit->items[++parent_offset].to_id = this->character_id;
|
||||
@@ -505,7 +505,7 @@ void Client::FinishTrade(Mob* tradingWith, ServerPacket* qspack, bool finalizer)
|
||||
}
|
||||
}
|
||||
else if(tradingWith && tradingWith->IsNPC()) {
|
||||
QSPlayerLogHandin_Struct* qsaudit = NULL;
|
||||
QSPlayerLogHandin_Struct* qsaudit = nullptr;
|
||||
bool QSPLH = false;
|
||||
|
||||
// QS code
|
||||
@@ -924,17 +924,17 @@ void Client::BulkSendTraderInventory(uint32 char_id) {
|
||||
safe_delete(inst);
|
||||
}
|
||||
else
|
||||
_log(TRADING__CLIENT, "Client::BulkSendTraderInventory NULL inst pointer");
|
||||
_log(TRADING__CLIENT, "Client::BulkSendTraderInventory nullptr inst pointer");
|
||||
}
|
||||
else
|
||||
_log(TRADING__CLIENT, "Client::BulkSendTraderInventory NULL item pointer or item is NODROP %8X",item);
|
||||
_log(TRADING__CLIENT, "Client::BulkSendTraderInventory nullptr item pointer or item is NODROP %8X",item);
|
||||
}
|
||||
safe_delete(TraderItems);
|
||||
}
|
||||
|
||||
ItemInst* Client::FindTraderItemBySerialNumber(int32 SerialNumber){
|
||||
|
||||
ItemInst* item = NULL;
|
||||
ItemInst* item = nullptr;
|
||||
uint16 SlotID = 0;
|
||||
for(int i = 0; i < 8;i++){
|
||||
item = this->GetInv().GetItem(22 + i);
|
||||
@@ -951,13 +951,13 @@ ItemInst* Client::FindTraderItemBySerialNumber(int32 SerialNumber){
|
||||
}
|
||||
_log(TRADING__CLIENT, "Client::FindTraderItemBySerialNumber Couldn't find item! Serial No. was %i", SerialNumber);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
GetItems_Struct* Client::GetTraderItems(){
|
||||
|
||||
const ItemInst* item = NULL;
|
||||
const ItemInst* item = nullptr;
|
||||
uint16 SlotID = 0;
|
||||
|
||||
GetItems_Struct* gis= new GetItems_Struct;
|
||||
@@ -988,7 +988,7 @@ GetItems_Struct* Client::GetTraderItems(){
|
||||
|
||||
uint16 Client::FindTraderItem(int32 SerialNumber, uint16 Quantity){
|
||||
|
||||
const ItemInst* item= NULL;
|
||||
const ItemInst* item= nullptr;
|
||||
uint16 SlotID = 0;
|
||||
for(int i = 0; i < 8;i++){
|
||||
item = this->GetInv().GetItem(22+i);
|
||||
@@ -1082,7 +1082,7 @@ void Client::TraderUpdate(uint16 SlotID,uint32 TraderID){
|
||||
|
||||
void Client::FindAndNukeTraderItem(int32 SerialNumber, uint16 Quantity, Client* Customer, uint16 TraderSlot){
|
||||
|
||||
const ItemInst* item= NULL;
|
||||
const ItemInst* item= nullptr;
|
||||
bool Stackable = false;
|
||||
int16 Charges=0;
|
||||
|
||||
@@ -2050,7 +2050,7 @@ void Client::SendBuyerResults(char* SearchString, uint32 SearchID) {
|
||||
}
|
||||
|
||||
uint32 LastCharID = 0;
|
||||
Client *Buyer = NULL;
|
||||
Client *Buyer = nullptr;
|
||||
|
||||
while ((Row = mysql_fetch_row(Result))) {
|
||||
|
||||
@@ -2714,7 +2714,7 @@ void Client::BuyerItemSearch(const EQApplicationPacket *app) {
|
||||
|
||||
pdest = strstr(Name, Criteria);
|
||||
|
||||
if (pdest != NULL) {
|
||||
if (pdest != nullptr) {
|
||||
sprintf(bisr->Results[Count].ItemName, item->Name);
|
||||
bisr->Results[Count].ItemID = item->ID;
|
||||
bisr->Results[Count].Unknown068 = item->Icon;
|
||||
|
||||
+17
-17
@@ -26,20 +26,20 @@
|
||||
|
||||
Schema:
|
||||
CREATE TABLE traps (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
zone varchar(16) NOT NULL default '',
|
||||
x int(11) NOT NULL default '0',
|
||||
y int(11) NOT NULL default '0',
|
||||
z int(11) NOT NULL default '0',
|
||||
chance tinyint NOT NULL default '0',
|
||||
maxzdiff float NOT NULL default '0',
|
||||
radius float NOT NULL default '0',
|
||||
effect int(11) NOT NULL default '0',
|
||||
effectvalue int(11) NOT NULL default '0',
|
||||
effectvalue2 int(11) NOT NULL default '0',
|
||||
message varcahr(200) NOT NULL;
|
||||
skill int(11) NOT NULL default '0',
|
||||
spawnchance int(11) NOT NULL default '0',
|
||||
id int(11) NOT nullptr auto_increment,
|
||||
zone varchar(16) NOT nullptr default '',
|
||||
x int(11) NOT nullptr default '0',
|
||||
y int(11) NOT nullptr default '0',
|
||||
z int(11) NOT nullptr default '0',
|
||||
chance tinyint NOT nullptr default '0',
|
||||
maxzdiff float NOT nullptr default '0',
|
||||
radius float NOT nullptr default '0',
|
||||
effect int(11) NOT nullptr default '0',
|
||||
effectvalue int(11) NOT nullptr default '0',
|
||||
effectvalue2 int(11) NOT nullptr default '0',
|
||||
message varcahr(200) NOT nullptr;
|
||||
skill int(11) NOT nullptr default '0',
|
||||
spawnchance int(11) NOT nullptr default '0',
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
@@ -67,7 +67,7 @@ Trap::Trap() :
|
||||
disarmed = false;
|
||||
respawn_time = 0;
|
||||
respawn_var = 0;
|
||||
hiddenTrigger = NULL;
|
||||
hiddenTrigger = nullptr;
|
||||
ownHiddenTrigger = false;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ void Trap::Trigger(Mob* trigger)
|
||||
trigger->SetHP(trigger->GetHP() - dmg);
|
||||
a->damage = dmg;
|
||||
a->sequence = MakeRandomInt(0, 1234567);
|
||||
a->source = GetHiddenTrigger()!=NULL ? GetHiddenTrigger()->GetID() : trigger->GetID();
|
||||
a->source = GetHiddenTrigger()!=nullptr ? GetHiddenTrigger()->GetID() : trigger->GetID();
|
||||
a->spellid = 0;
|
||||
a->target = trigger->GetID();
|
||||
a->type = 253;
|
||||
@@ -205,7 +205,7 @@ Trap* EntityList::FindNearbyTrap(Mob* searcher, float max_dist) {
|
||||
LinkedListIterator<Trap*> iterator(trap_list);
|
||||
iterator.Reset();
|
||||
float dist = 999999;
|
||||
Trap* current_trap = NULL;
|
||||
Trap* current_trap = nullptr;
|
||||
|
||||
float max_dist2 = max_dist*max_dist;
|
||||
Trap *cur;
|
||||
|
||||
+3
-3
@@ -167,7 +167,7 @@ void Client::DoTributeUpdate() {
|
||||
|
||||
//summon the item for them
|
||||
const ItemInst* inst = database.CreateItem(item_id, 1);
|
||||
if(inst == NULL)
|
||||
if(inst == nullptr)
|
||||
continue;
|
||||
|
||||
PutItemInInventory(TRIBUTE_SLOT_START+r, *inst, false);
|
||||
@@ -246,7 +246,7 @@ void Client::SendTributeDetails(uint32 client_id, uint32 tribute_id) {
|
||||
int32 Client::TributeItem(uint32 slot, uint32 quantity) {
|
||||
const ItemInst*inst = m_inv[slot];
|
||||
|
||||
if(inst == NULL)
|
||||
if(inst == nullptr)
|
||||
return(0);
|
||||
|
||||
//figure out what its worth
|
||||
@@ -401,7 +401,7 @@ bool ZoneDatabase::LoadTributes() {
|
||||
uint32 id = atoul(row[r++]);
|
||||
t.name = row[r++];
|
||||
t.description = row[r++];
|
||||
t.unknown = strtoul(row[r++], NULL, 10);
|
||||
t.unknown = strtoul(row[r++], nullptr, 10);
|
||||
t.is_guild = atol(row[r++])==0?false:true;
|
||||
|
||||
tribute_list[id] = t;
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ class Mob;
|
||||
class UMType {
|
||||
public:
|
||||
UMType() {
|
||||
app = NULL; ack = false;
|
||||
app = nullptr; ack = false;
|
||||
}
|
||||
UMType(EQApplicationPacket *_app, bool _ack) {
|
||||
app = _app; ack = _ack;
|
||||
|
||||
+10
-10
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
WaterMap::WaterMap()
|
||||
: BSP_Root(NULL)
|
||||
: BSP_Root(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -86,28 +86,28 @@ WaterRegionType WaterMap::BSPReturnRegionType(int32 node_number, float y, float
|
||||
}
|
||||
|
||||
bool WaterMap::InWater(float y, float x, float z) const {
|
||||
if(BSP_Root == NULL) {
|
||||
if(BSP_Root == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return(BSPReturnRegionType(1, y, x, z) == RegionTypeWater);
|
||||
}
|
||||
|
||||
bool WaterMap::InVWater(float y, float x, float z) const {
|
||||
if(BSP_Root == NULL) {
|
||||
if(BSP_Root == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return(BSPReturnRegionType(1, y, x, z) == RegionTypeVWater);
|
||||
}
|
||||
|
||||
bool WaterMap::InLava(float y, float x, float z) const {
|
||||
if(BSP_Root == NULL) {
|
||||
if(BSP_Root == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return(BSPReturnRegionType(1, y, x, z) == RegionTypeLava);
|
||||
}
|
||||
|
||||
bool WaterMap::InLiquid(float y, float x, float z) const {
|
||||
if(BSP_Root == NULL) //if the water map isn't loaded, this will save ~1 CPU cycle
|
||||
if(BSP_Root == nullptr) //if the water map isn't loaded, this will save ~1 CPU cycle
|
||||
return false;
|
||||
return (InWater(y, x, z) || InLava(y, x, z));
|
||||
}
|
||||
@@ -116,26 +116,26 @@ WaterMap* WaterMap::LoadWaterMapfile(const char* in_zonename, const char *direct
|
||||
FILE *fp;
|
||||
char zBuf[64];
|
||||
char cWork[256];
|
||||
WaterMap* ret = NULL;
|
||||
WaterMap* ret = nullptr;
|
||||
|
||||
|
||||
//have to convert to lower because the short names im getting
|
||||
//are not all lower anymore, copy since strlwr edits the str.
|
||||
strn0cpy(zBuf, in_zonename, 64);
|
||||
|
||||
if(directory == NULL)
|
||||
if(directory == nullptr)
|
||||
directory = MAP_DIR;
|
||||
snprintf(cWork, 250, "%s/%s.wtr", directory, strlwr(zBuf));
|
||||
|
||||
if ((fp = fopen( cWork, "rb" ))) {
|
||||
ret = new WaterMap();
|
||||
if(ret != NULL) {
|
||||
if(ret != nullptr) {
|
||||
if(ret->loadWaterMap(fp)) {
|
||||
printf("Water Map %s loaded.\n", cWork);
|
||||
} else {
|
||||
safe_delete(ret);
|
||||
printf("Water Map %s exists but could not be processed.\n", cWork);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
printf("Water Map %s loading failed.\n", cWork);
|
||||
@@ -177,7 +177,7 @@ bool WaterMap::loadWaterMap(FILE *fp) {
|
||||
|
||||
BSP_Root = (ZBSP_Node *) new ZBSP_Node[BSPTreeSize];
|
||||
|
||||
if(BSP_Root==NULL) {
|
||||
if(BSP_Root==nullptr) {
|
||||
printf("Memory allocation failed while reading water map.\n");
|
||||
return(false);
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ typedef enum {
|
||||
class WaterMap {
|
||||
|
||||
public:
|
||||
static WaterMap* LoadWaterMapfile(const char* in_zonename, const char *directory = NULL);
|
||||
static WaterMap* LoadWaterMapfile(const char* in_zonename, const char *directory = nullptr);
|
||||
WaterRegionType BSPReturnRegionType(int32 node_number, float y, float x, float z) const;
|
||||
bool InWater(float y, float x, float z) const;
|
||||
bool InVWater(float y, float x, float z) const;
|
||||
|
||||
+8
-8
@@ -128,7 +128,7 @@ void NPC::ResumeWandering()
|
||||
itoa(cur_wp,temp,10); //do this before updating to next waypoint
|
||||
CalculateNewWaypoint();
|
||||
SetAppearance(eaStanding, false);
|
||||
parse->EventNPC(EVENT_WAYPOINT_DEPART, this, NULL, temp, 0);
|
||||
parse->EventNPC(EVENT_WAYPOINT_DEPART, this, nullptr, temp, 0);
|
||||
} // if not currently at a waypoint, we continue on to the one we were headed to before the stop
|
||||
}
|
||||
else
|
||||
@@ -237,7 +237,7 @@ void NPC::UpdateWaypoint(int wp_index)
|
||||
{
|
||||
VERTEX dest(cur_wp_x, cur_wp_y, cur_wp_z);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, NULL, NULL);
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, nullptr, nullptr);
|
||||
|
||||
if( (newz > -2000) && ABS(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaWaypoint))
|
||||
cur_wp_z = newz + 1;
|
||||
@@ -564,7 +564,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
{
|
||||
VERTEX dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, NULL, NULL);
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, nullptr, nullptr);
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
@@ -673,7 +673,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
{
|
||||
VERTEX dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, NULL, NULL);
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, nullptr, nullptr);
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
@@ -790,7 +790,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
{
|
||||
VERTEX dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, NULL, NULL);
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, nullptr, nullptr);
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
@@ -900,7 +900,7 @@ void NPC::AssignWaypoints(int32 grid) {
|
||||
{
|
||||
VERTEX dest(newwp.x, newwp.y, newwp.z);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, NULL, NULL);
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, nullptr, nullptr);
|
||||
|
||||
if( (newz > -2000) && ABS(newz-dest.z) < RuleR(Map, FixPathingZMaxDeltaLoading))
|
||||
newwp.z = newz + 1;
|
||||
@@ -951,7 +951,7 @@ void Mob::SendTo(float new_x, float new_y, float new_z) {
|
||||
{
|
||||
VERTEX dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, NULL, NULL);
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, nullptr, nullptr);
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
@@ -978,7 +978,7 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) {
|
||||
{
|
||||
VERTEX dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, NULL, NULL);
|
||||
float newz = zone->zonemap->FindBestZ(MAP_ROOT_NODE, dest, nullptr, nullptr);
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
|
||||
+11
-11
@@ -321,7 +321,7 @@ void WorldServer::Process() {
|
||||
zc2->success = 1;
|
||||
|
||||
// This block is necessary to clean up any merc objects owned by a Client. Maybe we should do this for bots, too?
|
||||
if(entity->CastToClient()->GetMerc() != NULL)
|
||||
if(entity->CastToClient()->GetMerc() != nullptr)
|
||||
{
|
||||
entity->CastToClient()->GetMerc()->ProcessClientZoneChange(entity->CastToClient());
|
||||
}
|
||||
@@ -413,7 +413,7 @@ void WorldServer::Process() {
|
||||
if(strstr(sem->message,"^")==0)
|
||||
client->Message(sem->type, (char*)sem->message);
|
||||
else{
|
||||
for(newmessage = strtok((char*)sem->message,"^");newmessage!=NULL;newmessage=strtok(NULL, "^"))
|
||||
for(newmessage = strtok((char*)sem->message,"^");newmessage!=nullptr;newmessage=strtok(nullptr, "^"))
|
||||
client->Message(sem->type, newmessage);
|
||||
}
|
||||
}
|
||||
@@ -424,7 +424,7 @@ void WorldServer::Process() {
|
||||
if(strstr(sem->message,"^")==0)
|
||||
entity_list.MessageStatus(sem->guilddbid, sem->minstatus, sem->type, sem->message);
|
||||
else{
|
||||
for(newmessage = strtok((char*)sem->message,"^");newmessage!=NULL;newmessage=strtok(NULL, "^"))
|
||||
for(newmessage = strtok((char*)sem->message,"^");newmessage!=nullptr;newmessage=strtok(nullptr, "^"))
|
||||
entity_list.MessageStatus(sem->guilddbid, sem->minstatus, sem->type, newmessage);
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ void WorldServer::Process() {
|
||||
case ServerOP_ZonePlayer: {
|
||||
ServerZonePlayer_Struct* szp = (ServerZonePlayer_Struct*) pack->pBuffer;
|
||||
Client* client = entity_list.GetClientByName(szp->name);
|
||||
printf("Zoning %s to %s(%u) - %u\n", client != NULL ? client->GetCleanName() : "Unknown", szp->zone, database.GetZoneID(szp->zone), szp->instance_id);
|
||||
printf("Zoning %s to %s(%u) - %u\n", client != nullptr ? client->GetCleanName() : "Unknown", szp->zone, database.GetZoneID(szp->zone), szp->instance_id);
|
||||
if (client != 0) {
|
||||
if (strcasecmp(szp->adminname, szp->name) == 0)
|
||||
client->Message(0, "Zoning to: %s", szp->zone);
|
||||
@@ -745,9 +745,9 @@ void WorldServer::Process() {
|
||||
char buffer[5];
|
||||
snprintf(buffer,5,"%i",zb->port); //just to be sure that it will work on linux
|
||||
if(zb->zoneid != 0)
|
||||
execl(net.GetZoneFileName(),net.GetZoneFileName(),database.GetZoneName(zb->zoneid),zb->ip2, buffer,inet_ntoa(in), NULL);
|
||||
execl(net.GetZoneFileName(),net.GetZoneFileName(),database.GetZoneName(zb->zoneid),zb->ip2, buffer,inet_ntoa(in), nullptr);
|
||||
else
|
||||
execl(net.GetZoneFileName(),net.GetZoneFileName(),".",zb->ip2, buffer,inet_ntoa(in), NULL);
|
||||
execl(net.GetZoneFileName(),net.GetZoneFileName(),".",zb->ip2, buffer,inet_ntoa(in), nullptr);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -763,7 +763,7 @@ void WorldServer::Process() {
|
||||
safe_delete(outapp);
|
||||
//TEST
|
||||
char timeMessage[255];
|
||||
time_t timeCurrent = time(NULL);
|
||||
time_t timeCurrent = time(nullptr);
|
||||
TimeOfDay_Struct eqTime;
|
||||
zone->zone_time.getEQTimeOfDay( timeCurrent, &eqTime);
|
||||
//if ( eqTime.hour >= 0 && eqTime.minute >= 0 )
|
||||
@@ -912,7 +912,7 @@ void WorldServer::Process() {
|
||||
|
||||
safe_delete(outapp);
|
||||
|
||||
if(!group->AddMember(NULL, sgfs->gf.name2, sgfs->CharacterID))
|
||||
if(!group->AddMember(nullptr, sgfs->gf.name2, sgfs->CharacterID))
|
||||
break;
|
||||
|
||||
if(Inviter->CastToClient()->IsLFP())
|
||||
@@ -960,7 +960,7 @@ void WorldServer::Process() {
|
||||
|
||||
uint32 groupid = database.GetGroupID(c->GetName());
|
||||
|
||||
Group* group = NULL;
|
||||
Group* group = nullptr;
|
||||
|
||||
if(groupid > 0)
|
||||
{
|
||||
@@ -973,7 +973,7 @@ void WorldServer::Process() {
|
||||
if(group->GetID() != 0)
|
||||
entity_list.AddGroup(group, groupid);
|
||||
else
|
||||
group = NULL;
|
||||
group = nullptr;
|
||||
} //else, somebody from our group is already here...
|
||||
|
||||
if(group)
|
||||
@@ -1515,7 +1515,7 @@ void WorldServer::Process() {
|
||||
ServerSpawnStatusChange_Struct *ssc = (ServerSpawnStatusChange_Struct*)pack->pBuffer;
|
||||
LinkedListIterator<Spawn2*> iterator(zone->spawn2_list);
|
||||
iterator.Reset();
|
||||
Spawn2 *found_spawn = NULL;
|
||||
Spawn2 *found_spawn = nullptr;
|
||||
while(iterator.MoreElements())
|
||||
{
|
||||
Spawn2* cur = iterator.GetData();
|
||||
|
||||
+33
-33
@@ -179,7 +179,7 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
//this really loads the objects into entity_list
|
||||
bool Zone::LoadZoneObjects() {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = NULL;
|
||||
char* query = nullptr;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
@@ -273,7 +273,7 @@ bool Zone::LoadZoneObjects() {
|
||||
data.unknown076 = (uint32)atoi(row[idx++]);
|
||||
data.unknown084 = 0;
|
||||
|
||||
ItemInst* inst = NULL;
|
||||
ItemInst* inst = nullptr;
|
||||
//FatherNitwit: this dosent seem to work...
|
||||
//tradeskill containers do not have an itemid of 0... at least what I am seeing
|
||||
if (itemid == 0) {
|
||||
@@ -286,7 +286,7 @@ bool Zone::LoadZoneObjects() {
|
||||
}
|
||||
|
||||
//Father Nitwit's fix... not perfect...
|
||||
if(inst == NULL && type != OT_DROPPEDITEM) {
|
||||
if(inst == nullptr && type != OT_DROPPEDITEM) {
|
||||
inst = new ItemInst(ItemUseWorldContainer);
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ bool Zone::LoadGroundSpawns() {
|
||||
uint32 gsnumber=0;
|
||||
for(gsindex=0;gsindex<50;gsindex++){
|
||||
if(groundspawn.spawn[gsindex].item>0 && groundspawn.spawn[gsindex].item<500000){
|
||||
ItemInst* inst = NULL;
|
||||
ItemInst* inst = nullptr;
|
||||
inst = database.CreateItem(groundspawn.spawn[gsindex].item);
|
||||
gsnumber=groundspawn.spawn[gsindex].max_allowed;
|
||||
ix=0;
|
||||
@@ -786,8 +786,8 @@ void Zone::DBAWComplete(uint8 workpt_b1, DBAsyncWork* dbaw) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
MYSQL_RES* result = 0;
|
||||
DBAsyncQuery* dbaq = dbaw->PopAnswer();
|
||||
if(dbaq == NULL) {
|
||||
LogFile->write(EQEMuLog::Error, "NULL answer provided for async merchant list load.");
|
||||
if(dbaq == nullptr) {
|
||||
LogFile->write(EQEMuLog::Error, "nullptr answer provided for async merchant list load.");
|
||||
break;
|
||||
}
|
||||
if(!dbaq->GetAnswer(errbuf, &result)) {
|
||||
@@ -808,8 +808,8 @@ void Zone::DBAWComplete(uint8 workpt_b1, DBAsyncWork* dbaw) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
MYSQL_RES* result = 0;
|
||||
DBAsyncQuery* dbaq = dbaw->PopAnswer();
|
||||
if(dbaq == NULL) {
|
||||
LogFile->write(EQEMuLog::Error, "NULL answer provided for async temp merchant list load.");
|
||||
if(dbaq == nullptr) {
|
||||
LogFile->write(EQEMuLog::Error, "nullptr answer provided for async temp merchant list load.");
|
||||
break;
|
||||
}
|
||||
if(!dbaq->GetAnswer(errbuf, &result)) {
|
||||
@@ -923,10 +923,10 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
zoneid = in_zoneid;
|
||||
instanceid = in_instanceid;
|
||||
instanceversion = database.GetInstanceVersion(instanceid);
|
||||
zonemap = NULL;
|
||||
watermap = NULL;
|
||||
pathing = NULL;
|
||||
qGlobals = NULL;
|
||||
zonemap = nullptr;
|
||||
watermap = nullptr;
|
||||
pathing = nullptr;
|
||||
qGlobals = nullptr;
|
||||
default_ruleset = 0;
|
||||
|
||||
if(RuleB(TaskSystem, EnableTaskSystem)) {
|
||||
@@ -972,13 +972,13 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
LogFile->write(EQEMuLog::Debug, "The next weather check for zone: %s will be in %i seconds.", short_name, Weather_Timer->GetRemainingTime()/1000);
|
||||
weather_type = 0;
|
||||
zone_weather = 0;
|
||||
blocked_spells = NULL;
|
||||
blocked_spells = nullptr;
|
||||
totalBS = 0;
|
||||
aas = NULL;
|
||||
aas = nullptr;
|
||||
totalAAs = 0;
|
||||
gottime = false;
|
||||
|
||||
Instance_Shutdown_Timer = NULL;
|
||||
Instance_Shutdown_Timer = nullptr;
|
||||
bool is_perma = false;
|
||||
if(instanceid > 0)
|
||||
{
|
||||
@@ -992,23 +992,23 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
}
|
||||
else
|
||||
{
|
||||
Instance_Timer = NULL;
|
||||
Instance_Timer = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Instance_Timer = NULL;
|
||||
Instance_Timer = nullptr;
|
||||
}
|
||||
adv_data = NULL;
|
||||
map_name = NULL;
|
||||
Instance_Warning_timer = NULL;
|
||||
adv_data = nullptr;
|
||||
map_name = nullptr;
|
||||
Instance_Warning_timer = nullptr;
|
||||
did_adventure_actions = false;
|
||||
database.QGlobalPurge();
|
||||
|
||||
if(zoneid == RuleI(World, GuildBankZoneID))
|
||||
GuildBanks = new GuildBankManager;
|
||||
else
|
||||
GuildBanks = NULL;
|
||||
GuildBanks = nullptr;
|
||||
}
|
||||
|
||||
Zone::~Zone() {
|
||||
@@ -1036,7 +1036,7 @@ Zone::~Zone() {
|
||||
safe_delete_array(adv_data);
|
||||
safe_delete_array(map_name);
|
||||
|
||||
if(aas != NULL) {
|
||||
if(aas != nullptr) {
|
||||
int r;
|
||||
for(r = 0; r < totalAAs; r++) {
|
||||
uchar *data = (uchar *) aas[r];
|
||||
@@ -1224,7 +1224,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe
|
||||
memset(&newzone_data, 0, sizeof(NewZone_Struct));
|
||||
if(instance_id == 0)
|
||||
{
|
||||
map_name = NULL;
|
||||
map_name = nullptr;
|
||||
if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind,
|
||||
can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, default_ruleset, &map_name))
|
||||
{
|
||||
@@ -1235,7 +1235,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe
|
||||
else
|
||||
{
|
||||
//Fall back to base zone if we don't find the instance version.
|
||||
map_name = NULL;
|
||||
map_name = nullptr;
|
||||
if(!database.GetZoneCFG(database.GetZoneID(filename), instance_id, &newzone_data, can_bind,
|
||||
can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, default_ruleset, &map_name))
|
||||
{
|
||||
@@ -1386,7 +1386,7 @@ bool Zone::Process() {
|
||||
|
||||
if(GetInstanceID() > 0)
|
||||
{
|
||||
if(Instance_Timer != NULL && Instance_Shutdown_Timer == NULL)
|
||||
if(Instance_Timer != nullptr && Instance_Shutdown_Timer == nullptr)
|
||||
{
|
||||
if(Instance_Timer->Check())
|
||||
{
|
||||
@@ -1395,9 +1395,9 @@ bool Zone::Process() {
|
||||
Instance_Shutdown_Timer = new Timer(20000); //20 seconds
|
||||
}
|
||||
|
||||
if(adv_data == NULL)
|
||||
if(adv_data == nullptr)
|
||||
{
|
||||
if(Instance_Warning_timer == NULL)
|
||||
if(Instance_Warning_timer == nullptr)
|
||||
{
|
||||
uint32 rem_time = Instance_Timer->GetRemainingTime();
|
||||
if(rem_time < 60000 && rem_time > 55000)
|
||||
@@ -1422,7 +1422,7 @@ bool Zone::Process() {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(Instance_Shutdown_Timer != NULL)
|
||||
else if(Instance_Shutdown_Timer != nullptr)
|
||||
{
|
||||
if(Instance_Shutdown_Timer->Check())
|
||||
{
|
||||
@@ -1630,7 +1630,7 @@ ZonePoint* Zone::GetClosestZonePoint(float x, float y, float z, uint32 to, Clien
|
||||
}
|
||||
|
||||
if(closest_dist > max_distance2)
|
||||
closest_zp = NULL;
|
||||
closest_zp = nullptr;
|
||||
|
||||
if(!closest_zp)
|
||||
closest_zp = GetClosestZonePointWithoutZone(x, y, z, client);
|
||||
@@ -1639,7 +1639,7 @@ ZonePoint* Zone::GetClosestZonePoint(float x, float y, float z, uint32 to, Clien
|
||||
}
|
||||
|
||||
ZonePoint* Zone::GetClosestZonePoint(float x, float y, float z, const char* to_name, Client* client, float max_distance) {
|
||||
if(to_name == NULL)
|
||||
if(to_name == nullptr)
|
||||
return GetClosestZonePointWithoutZone(x,y,z, client, max_distance);
|
||||
return GetClosestZonePoint(x, y, z, database.GetZoneID(to_name), client, max_distance);
|
||||
}
|
||||
@@ -1677,7 +1677,7 @@ ZonePoint* Zone::GetClosestZonePointWithoutZone(float x, float y, float z, Clien
|
||||
iterator.Advance();
|
||||
}
|
||||
if(closest_dist > max_distance2)
|
||||
closest_zp = NULL;
|
||||
closest_zp = nullptr;
|
||||
|
||||
return closest_zp;
|
||||
}
|
||||
@@ -1711,7 +1711,7 @@ bool ZoneDatabase::LoadStaticZonePoints(LinkedList<ZonePoint*>* zone_point_list,
|
||||
zp->target_heading = atof(row[8]);
|
||||
zp->number = atoi(row[9]);
|
||||
zp->target_zone_instance = atoi(row[10]);
|
||||
zp->client_version_mask = (uint32)strtoul(row[11], NULL, 0);
|
||||
zp->client_version_mask = (uint32)strtoul(row[11], nullptr, 0);
|
||||
zone_point_list->Insert(zp);
|
||||
zone->numzonepoints++;
|
||||
}
|
||||
@@ -2398,7 +2398,7 @@ void Zone::LoadLDoNTrapEntries()
|
||||
uint32 id = atoi(row[0]);
|
||||
uint32 trap_id = atoi(row[1]);
|
||||
|
||||
LDoNTrapTemplate *tt = NULL;
|
||||
LDoNTrapTemplate *tt = nullptr;
|
||||
std::map<uint32,LDoNTrapTemplate*>::iterator it;
|
||||
it = ldon_trap_list.find(trap_id);
|
||||
if(it == ldon_trap_list.end())
|
||||
|
||||
+2
-2
@@ -248,8 +248,8 @@ public:
|
||||
bool IsSpellBlocked(uint32 spell_id, float nx, float ny, float nz);
|
||||
const char *GetSpellBlockedMessage(uint32 spell_id, float nx, float ny, float nz);
|
||||
int GetTotalBlockedSpells() { return totalBS; }
|
||||
inline bool HasMap() { return zonemap != NULL; }
|
||||
inline bool HasWaterMap() { return watermap != NULL; }
|
||||
inline bool HasMap() { return zonemap != nullptr; }
|
||||
inline bool HasWaterMap() { return watermap != nullptr; }
|
||||
|
||||
QGlobalCache *GetQGlobals() { return qGlobals; }
|
||||
QGlobalCache *CreateQGlobals() { qGlobals = new QGlobalCache(); return qGlobals; }
|
||||
|
||||
+37
-37
@@ -38,7 +38,7 @@ void ZoneDatabase::ZDBInitVars() {
|
||||
npc_spells_cache = 0;
|
||||
npc_spells_loadtried = 0;
|
||||
max_faction = 0;
|
||||
faction_array = NULL;
|
||||
faction_array = nullptr;
|
||||
}
|
||||
|
||||
ZoneDatabase::~ZoneDatabase() {
|
||||
@@ -51,7 +51,7 @@ ZoneDatabase::~ZoneDatabase() {
|
||||
}
|
||||
safe_delete_array(npc_spells_loadtried);
|
||||
|
||||
if (faction_array != NULL) {
|
||||
if (faction_array != nullptr) {
|
||||
for (x=0; x <= max_faction; x++) {
|
||||
if (faction_array[x] != 0)
|
||||
safe_delete(faction_array[x]);
|
||||
@@ -167,7 +167,7 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
|
||||
void ZoneDatabase::UpdateSpawn2Timeleft(uint32 id, uint16 instance_id, uint32 timeleft)
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
gettimeofday(&tv, nullptr);
|
||||
uint32 cur = tv.tv_sec;
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
@@ -214,7 +214,7 @@ uint32 ZoneDatabase::GetSpawnTimeLeft(uint32 id, uint16 instance_id)
|
||||
if(row)
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
gettimeofday(&tv, nullptr);
|
||||
uint32 resStart = atoi(row[0]);
|
||||
uint32 resDuration = atoi(row[1]);
|
||||
|
||||
@@ -289,7 +289,7 @@ void ZoneDatabase::UpdateBug(BugStruct* bug){
|
||||
|
||||
|
||||
uint32 len = strlen(bug->bug);
|
||||
char* bugtext = NULL;
|
||||
char* bugtext = nullptr;
|
||||
if(len > 0)
|
||||
{
|
||||
bugtext = new char[2*len+1];
|
||||
@@ -298,7 +298,7 @@ void ZoneDatabase::UpdateBug(BugStruct* bug){
|
||||
}
|
||||
|
||||
len = strlen(bug->ui);
|
||||
char* uitext = NULL;
|
||||
char* uitext = nullptr;
|
||||
if(len > 0)
|
||||
{
|
||||
uitext = new char[2*len+1];
|
||||
@@ -307,7 +307,7 @@ void ZoneDatabase::UpdateBug(BugStruct* bug){
|
||||
}
|
||||
|
||||
len = strlen(bug->target_name);
|
||||
char* targettext = NULL;
|
||||
char* targettext = nullptr;
|
||||
if(len > 0)
|
||||
{
|
||||
targettext = new char[2*len+1];
|
||||
@@ -318,8 +318,8 @@ void ZoneDatabase::UpdateBug(BugStruct* bug){
|
||||
//x and y are intentionally swapped because eq is inversexy coords
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO bugs (zone, name, ui, x, y, z, type, flag, target, bug, date) "
|
||||
"values('%s', '%s', '%s', '%.2f', '%.2f', '%.2f', '%s', %d, '%s', '%s', CURDATE())", zone->GetShortName(), bug->name,
|
||||
uitext==NULL?"":uitext, bug->y, bug->x, bug->z, bug->chartype, bug->type, targettext==NULL?"Unknown Target":targettext,
|
||||
bugtext==NULL?"":bugtext), errbuf)) {
|
||||
uitext==nullptr?"":uitext, bug->y, bug->x, bug->z, bug->chartype, bug->type, targettext==nullptr?"Unknown Target":targettext,
|
||||
bugtext==nullptr?"":bugtext), errbuf)) {
|
||||
cerr << "Error in UpdateBug" << query << "' " << errbuf << endl;
|
||||
}
|
||||
safe_delete_array(query);
|
||||
@@ -473,7 +473,7 @@ void ZoneDatabase::GetEventLogs(const char* name,char* target,uint32 account_id,
|
||||
void ZoneDatabase::LoadWorldContainer(uint32 parentid, ItemInst* container)
|
||||
{
|
||||
if (!container) {
|
||||
LogFile->write(EQEMuLog::Error, "Programming error: LoadWorldContainer passed NULL pointer");
|
||||
LogFile->write(EQEMuLog::Error, "Programming error: LoadWorldContainer passed nullptr pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -481,8 +481,8 @@ void ZoneDatabase::LoadWorldContainer(uint32 parentid, ItemInst* container)
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
//const Item_Struct* item = NULL;
|
||||
//ItemInst* inst = NULL;
|
||||
//const Item_Struct* item = nullptr;
|
||||
//ItemInst* inst = nullptr;
|
||||
|
||||
uint32 len_query = MakeAnyLenString(&query, "select "
|
||||
"bagidx,itemid,charges,augslot1,augslot2,augslot3,augslot4,augslot5 from object_contents where parentid=%i", parentid);
|
||||
@@ -646,7 +646,7 @@ ItemInst* ZoneDatabase::LoadSingleTraderItem(uint32 CharID, int SerialNumber) {
|
||||
|
||||
if (mysql_num_rows(result) != 1) {
|
||||
_log(TRADING__CLIENT, "Bad result from query\n"); fflush(stdout);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
row = mysql_fetch_row(result);
|
||||
int ItemID = atoi(row[1]);
|
||||
@@ -657,14 +657,14 @@ ItemInst* ZoneDatabase::LoadSingleTraderItem(uint32 CharID, int SerialNumber) {
|
||||
|
||||
if(!item) {
|
||||
_log(TRADING__CLIENT, "Unable to create item\n"); fflush(stdout);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (item && (item->NoDrop!=0)) {
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
if(!inst) {
|
||||
_log(TRADING__CLIENT, "Unable to create item instance\n"); fflush(stdout);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
inst->SetCharges(Charges);
|
||||
@@ -678,7 +678,7 @@ ItemInst* ZoneDatabase::LoadSingleTraderItem(uint32 CharID, int SerialNumber) {
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
|
||||
}
|
||||
@@ -898,7 +898,7 @@ bool ZoneDatabase::GetCharacterInfoForLogin_result(MYSQL_RES* result,
|
||||
pp->y = atof(row[4]);
|
||||
pp->z = atof(row[5]);
|
||||
|
||||
pp->lastlogin = time(NULL);
|
||||
pp->lastlogin = time(nullptr);
|
||||
|
||||
if (pp->x == -1 && pp->y == -1 && pp->z == -1)
|
||||
GetSafePoints(pp->zone_id, database.GetInstanceVersion(pp->zoneInstance), &pp->x, &pp->y, &pp->z);
|
||||
@@ -913,13 +913,13 @@ bool ZoneDatabase::GetCharacterInfoForLogin_result(MYSQL_RES* result,
|
||||
strcpy(current_zone, row[2]);
|
||||
|
||||
if (guilddbid) {
|
||||
if(row[6] != NULL)
|
||||
if(row[6] != nullptr)
|
||||
*guilddbid = atoi(row[6]);
|
||||
else
|
||||
*guilddbid = GUILD_NONE;
|
||||
}
|
||||
if (guildrank) {
|
||||
if(row[7] != NULL)
|
||||
if(row[7] != nullptr)
|
||||
*guildrank = atoi(row[7]);
|
||||
else
|
||||
*guildrank = GUILD_RANK_NONE;
|
||||
@@ -983,11 +983,11 @@ bool ZoneDatabase::NoRentExpired(const char* name){
|
||||
}
|
||||
|
||||
/* Searches npctable for matching id, and returns the item if found,
|
||||
* or NULL otherwise. If id passed is 0, loads all npc_types for
|
||||
* or nullptr otherwise. If id passed is 0, loads all npc_types for
|
||||
* the current zone, returning the last item added.
|
||||
*/
|
||||
const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
||||
const NPCType *npc=NULL;
|
||||
const NPCType *npc=nullptr;
|
||||
map<uint32,NPCType *>::iterator itr;
|
||||
|
||||
// If NPC is already in tree, return it.
|
||||
@@ -1179,8 +1179,8 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
||||
if (tmpNPCType->armor_tint[0] == 0)
|
||||
{
|
||||
char at_errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *at_query = NULL;
|
||||
MYSQL_RES *at_result = NULL;
|
||||
char *at_query = nullptr;
|
||||
MYSQL_RES *at_result = nullptr;
|
||||
MYSQL_ROW at_row;
|
||||
|
||||
MakeAnyLenString(&at_query,
|
||||
@@ -1241,7 +1241,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
||||
|
||||
tmpNPCType->see_invis = atoi(row[r++]);
|
||||
tmpNPCType->see_invis_undead = atoi(row[r++])==0?false:true; // Set see_invis_undead flag
|
||||
if (row[r] != NULL)
|
||||
if (row[r] != nullptr)
|
||||
strn0cpy(tmpNPCType->lastname, row[r], 32);
|
||||
r++;
|
||||
|
||||
@@ -1269,7 +1269,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
||||
{
|
||||
cerr << "Error loading duplicate NPC " << tmpNPCType->npc_id << endl;
|
||||
delete tmpNPCType;
|
||||
npc = NULL;
|
||||
npc = nullptr;
|
||||
} else {
|
||||
zone->npctable[tmpNPCType->npc_id]=tmpNPCType;
|
||||
npc = tmpNPCType;
|
||||
@@ -1290,7 +1290,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
||||
|
||||
|
||||
const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 clientlevel) {
|
||||
const NPCType *npc=NULL;
|
||||
const NPCType *npc=nullptr;
|
||||
map<uint32,NPCType *>::iterator itr;
|
||||
|
||||
//need to save based on merc_npc_type & client level
|
||||
@@ -1299,9 +1299,9 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
|
||||
// If NPC is already in tree, return it.
|
||||
if((itr = zone->merctable.find(merc_type_id)) != zone->merctable.end())
|
||||
return itr->second;
|
||||
//If the NPC type is 0, return NULL. (sanity check)
|
||||
//If the NPC type is 0, return nullptr. (sanity check)
|
||||
if(id == 0)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Otherwise, get NPCs from database.
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
@@ -1490,8 +1490,8 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
|
||||
if (tmpNPCType->armor_tint[0] == 0)
|
||||
{
|
||||
char at_errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *at_query = NULL;
|
||||
MYSQL_RES *at_result = NULL;
|
||||
char *at_query = nullptr;
|
||||
MYSQL_RES *at_result = nullptr;
|
||||
MYSQL_ROW at_row;
|
||||
|
||||
MakeAnyLenString(&at_query,
|
||||
@@ -1552,7 +1552,7 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
|
||||
|
||||
//tmpNPCType->see_invis = atoi(row[r++]);
|
||||
//tmpNPCType->see_invis_undead = atoi(row[r++])==0?false:true; // Set see_invis_undead flag
|
||||
//if (row[r] != NULL)
|
||||
//if (row[r] != nullptr)
|
||||
// strn0cpy(tmpNPCType->lastname, row[r], 32);
|
||||
//r++;
|
||||
|
||||
@@ -1579,7 +1579,7 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
|
||||
if (zone->merctable.find(tmpNPCType->npc_id * 100 + clientlevel) != zone->merctable.end())
|
||||
{
|
||||
delete tmpNPCType;
|
||||
npc = NULL;
|
||||
npc = nullptr;
|
||||
} else {
|
||||
zone->merctable[tmpNPCType->npc_id * 100 + clientlevel]=tmpNPCType;
|
||||
npc = tmpNPCType;
|
||||
@@ -2290,7 +2290,7 @@ void ZoneDatabase::RefreshGroupFromDB(Client *c){
|
||||
MYSQL_ROW row;
|
||||
|
||||
strcpy(gu->yourname, c->GetName());
|
||||
GetGroupLeadershipInfo(g->GetID(), gu->leadersname, NULL, NULL, NULL, NULL, &gu->leader_aas);
|
||||
GetGroupLeadershipInfo(g->GetID(), gu->leadersname, nullptr, nullptr, nullptr, nullptr, &gu->leader_aas);
|
||||
gu->NPCMarkerID = g->GetNPCMarkerID();
|
||||
|
||||
int index = 0;
|
||||
@@ -2336,7 +2336,7 @@ uint8 ZoneDatabase::GroupCount(uint32 groupid){
|
||||
MYSQL_ROW row;
|
||||
uint8 count=0;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT count(charid) FROM group_id WHERE groupid=%d", groupid), errbuf, &result)) {
|
||||
if((row = mysql_fetch_row(result))!=NULL)
|
||||
if((row = mysql_fetch_row(result))!=nullptr)
|
||||
count = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
@@ -2354,7 +2354,7 @@ uint8 ZoneDatabase::GroupCount(uint32 groupid){
|
||||
MYSQL_ROW row;
|
||||
uint8 count=0;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT count(charid) FROM raid_members WHERE raidid=%d AND groupid=%d;", raidid, groupid), errbuf, &result)) {
|
||||
if((row = mysql_fetch_row(result))!=NULL)
|
||||
if((row = mysql_fetch_row(result))!=nullptr)
|
||||
count = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
@@ -2376,7 +2376,7 @@ int32 ZoneDatabase::GetBlockedSpellsCount(uint32 zoneid)
|
||||
if (RunQuery(query, strlen(query), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
row = mysql_fetch_row(result);
|
||||
if (row != NULL && row[0] != 0) {
|
||||
if (row != nullptr && row[0] != 0) {
|
||||
int32 ret = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
return ret;
|
||||
@@ -3143,7 +3143,7 @@ bool ZoneDatabase::LoadFactionData()
|
||||
faction_array = new Faction*[max_faction+1];
|
||||
for(unsigned int i=0; i<max_faction; i++)
|
||||
{
|
||||
faction_array[i] = NULL;
|
||||
faction_array[i] = nullptr;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ void DispatchFinishedDBAsync(DBAsyncWork* dbaw) {
|
||||
}
|
||||
}*/
|
||||
case DBA_b4_Zone: {
|
||||
if(zone == NULL)
|
||||
if(zone == nullptr)
|
||||
break;
|
||||
zone->DBAWComplete(workpt.b1(), dbaw);
|
||||
break;
|
||||
|
||||
+8
-8
@@ -49,7 +49,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
uint16 target_zone_id = 0;
|
||||
uint16 target_instance_id = zc->instanceID;
|
||||
ZonePoint* zone_point = NULL;
|
||||
ZonePoint* zone_point = nullptr;
|
||||
|
||||
//figure out where they are going.
|
||||
if(zc->zoneID == 0) {
|
||||
@@ -146,7 +146,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
//make sure its a valid zone.
|
||||
const char *target_zone_name = database.GetZoneName(target_zone_id);
|
||||
if(target_zone_name == NULL) {
|
||||
if(target_zone_name == nullptr) {
|
||||
//invalid zone...
|
||||
Message(13, "Invalid target zone ID.");
|
||||
LogFile->write(EQEMuLog::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id);
|
||||
@@ -215,7 +215,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
//client requested a zoning... what are the cases when this could happen?
|
||||
|
||||
//Handle zone point case:
|
||||
if(zone_point != NULL) {
|
||||
if(zone_point != nullptr) {
|
||||
//they are zoning using a valid zone point, figure out coords
|
||||
|
||||
//999999 is a placeholder for 'same as where they were from'
|
||||
@@ -422,7 +422,7 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y,
|
||||
if(GetPetID() != 0) {
|
||||
//if they have a pet and they are staying in zone, move with them
|
||||
Mob *p = GetPet();
|
||||
if(p != NULL){
|
||||
if(p != nullptr){
|
||||
p->SetPetOrder(SPO_Follow);
|
||||
p->GMMove(x+15, y, z); //so it dosent have to run across the map.
|
||||
}
|
||||
@@ -464,8 +464,8 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y,
|
||||
void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z, float heading, uint8 ignorerestrictions, ZoneMode zm) {
|
||||
bool ReadyToZone = true;
|
||||
int iZoneNameLength = 0;
|
||||
const char* pShortZoneName = NULL;
|
||||
char* pZoneName = NULL;
|
||||
const char* pShortZoneName = nullptr;
|
||||
char* pZoneName = nullptr;
|
||||
|
||||
pShortZoneName = database.GetZoneName(zoneID);
|
||||
database.GetZoneLongName(pShortZoneName, &pZoneName);
|
||||
@@ -799,9 +799,9 @@ void Client::SendZoneFlagInfo(Client *to) const {
|
||||
|
||||
const char *short_name = database.GetZoneName(zoneid);
|
||||
|
||||
char *long_name = NULL;
|
||||
char *long_name = nullptr;
|
||||
database.GetZoneLongName(short_name, &long_name);
|
||||
if(long_name == NULL)
|
||||
if(long_name == nullptr)
|
||||
long_name = empty;
|
||||
|
||||
float safe_x, safe_y, safe_z;
|
||||
|
||||
Reference in New Issue
Block a user