mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server
This commit is contained in:
+5
-5
@@ -443,7 +443,6 @@ void Client::HandleAAAction(aaID activate) {
|
||||
}
|
||||
break;
|
||||
|
||||
// seveian 2008-09-23
|
||||
case aaActionProjectIllusion:
|
||||
EnableAAEffect(aaEffectProjectIllusion, 3600);
|
||||
Message(10, "The power of your next illusion spell will flow to your grouped target in your place.");
|
||||
@@ -453,8 +452,9 @@ void Client::HandleAAAction(aaID activate) {
|
||||
case aaActionEscape:
|
||||
Escape();
|
||||
break;
|
||||
|
||||
case aaBeastialAlignment:
|
||||
|
||||
// Don't think this code is used any longer for Bestial Alignment as the AA has a spell_id and no nonspell_action.
|
||||
case aaActionBeastialAlignment:
|
||||
switch(GetBaseRace()) {
|
||||
case BARBARIAN:
|
||||
spell_id = AA_Choose3(activate_val, 4521, 4522, 4523);
|
||||
@@ -1038,7 +1038,7 @@ void Client::BuyAA(AA_Action* action)
|
||||
m_pp.aapoints -= real_cost;
|
||||
|
||||
Save();
|
||||
if ((RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (aa2->hotkey_sid == 4294967295))
|
||||
if ((RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (aa2->hotkey_sid == 4294967295u))
|
||||
&& ((aa2->max_level == (cur_level+1)) && aa2->sof_next_id)){
|
||||
SendAA(aa2->id);
|
||||
SendAA(aa2->sof_next_id);
|
||||
@@ -1240,7 +1240,7 @@ void Client::SendAA(uint32 id, int seq) {
|
||||
3) When you zone/buy your player profile will be checked and determine what AA can be displayed base on what you have already.
|
||||
*/
|
||||
|
||||
if (RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (saa2->hotkey_sid == 4294967295))
|
||||
if (RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (saa2->hotkey_sid == 4294967295u))
|
||||
aa_stack = true;
|
||||
|
||||
if (aa_stack){
|
||||
|
||||
+4
-2
@@ -249,8 +249,10 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
||||
|
||||
//sometimes if a client has some lag while zoning into a dangerous place while either invis or a GM
|
||||
//they will aggro mobs even though it's supposed to be impossible, to lets make sure we've finished connecting
|
||||
if(mob->IsClient() && !mob->CastToClient()->ClientFinishedLoading())
|
||||
return false;
|
||||
if (mob->IsClient()) {
|
||||
if (!mob->CastToClient()->ClientFinishedLoading() || mob->CastToClient()->IsHoveringForRespawn())
|
||||
return false;
|
||||
}
|
||||
|
||||
Mob *ownr = mob->GetOwner();
|
||||
if(ownr && ownr->IsClient() && !ownr->CastToClient()->ClientFinishedLoading())
|
||||
|
||||
+668
-668
File diff suppressed because it is too large
Load Diff
+10
-10
@@ -32,7 +32,7 @@ const int MaxSpellTypes = 16;
|
||||
const int MaxHealRotationMembers = 6;
|
||||
const int MaxHealRotationTargets = 3;
|
||||
|
||||
typedef enum BotStanceType {
|
||||
enum BotStanceType {
|
||||
BotStancePassive,
|
||||
BotStanceBalanced,
|
||||
BotStanceEfficient,
|
||||
@@ -42,7 +42,7 @@ typedef enum BotStanceType {
|
||||
BotStanceBurnAE
|
||||
};
|
||||
|
||||
typedef enum SpellTypeIndex {
|
||||
enum SpellTypeIndex {
|
||||
SpellType_NukeIndex,
|
||||
SpellType_HealIndex,
|
||||
SpellType_RootIndex,
|
||||
@@ -64,7 +64,7 @@ typedef enum SpellTypeIndex {
|
||||
class Bot : public NPC {
|
||||
public:
|
||||
// Class enums
|
||||
typedef enum BotfocusType { //focus types
|
||||
enum BotfocusType { //focus types
|
||||
BotfocusSpellHaste = 1,
|
||||
BotfocusSpellDuration,
|
||||
BotfocusRange,
|
||||
@@ -97,18 +97,18 @@ public:
|
||||
BotfocusAdditionalHeal,
|
||||
};
|
||||
|
||||
typedef enum BotTradeType { // types of trades a bot can do
|
||||
enum BotTradeType { // types of trades a bot can do
|
||||
BotTradeClientNormal,
|
||||
BotTradeClientNoDropNoTrade
|
||||
};
|
||||
|
||||
typedef enum BotRoleType {
|
||||
enum BotRoleType {
|
||||
BotRoleMainAssist,
|
||||
BotRoleGroupHealer,
|
||||
BotRoleRaidHealer
|
||||
};
|
||||
|
||||
typedef enum EqExpansions {
|
||||
enum EqExpansions {
|
||||
ExpansionNone,
|
||||
ExpansionEQ,
|
||||
ExpansionRoK,
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
virtual bool HasGroup() { return (GetGroup() ? true : false); }
|
||||
virtual Raid* GetRaid() { return entity_list.GetRaidByMob(this); }
|
||||
virtual Group* GetGroup() { return entity_list.GetGroupByMob(this); }
|
||||
|
||||
|
||||
// Common, but informal "interfaces" with Client object
|
||||
uint32 CharacterID() { return GetBotID(); } // Just returns the Bot Id
|
||||
inline bool IsInAGuild() const { return (_guildId != GUILD_NONE && _guildId != 0); }
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
bool RemoveHealRotationTarget( Mob* target );
|
||||
bool RemoveHealRotationTarget( int index);
|
||||
void NotifyNextHealRotationMember( bool notifyNow = false );
|
||||
void ClearHealRotationLeader() { _healRotationLeader = NULL; }
|
||||
void ClearHealRotationLeader() { _healRotationLeader = 0; }
|
||||
void ClearHealRotationMembers();
|
||||
void ClearHealRotationTargets();
|
||||
inline virtual int16 GetMaxStat();
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
int32 CalcEnduranceRegen(); //Calculates endurance regen used in DoEnduranceRegen()
|
||||
int32 GetEndurance() const {return cur_end;} //This gets our current endurance
|
||||
int32 GetMaxEndurance() const {return max_end;} //This gets our endurance from the last CalcMaxEndurance() call
|
||||
int32 CalcEnduranceRegenCap();
|
||||
int32 CalcEnduranceRegenCap();
|
||||
inline uint8 GetEndurancePercent() { return (uint8)((float)cur_end / (float)max_end * 100.0f); }
|
||||
void SetEndurance(int32 newEnd); //This sets the current endurance to the new value
|
||||
void DoEnduranceRegen(); //This Regenerates endurance
|
||||
@@ -516,7 +516,7 @@ public:
|
||||
inline virtual int16 GetPercMod() const { return itembonuses.percussionMod; }
|
||||
inline virtual int16 GetStringMod() const { return itembonuses.stringedMod; }
|
||||
inline virtual int16 GetWindMod() const { return itembonuses.windMod; }
|
||||
|
||||
|
||||
inline virtual int16 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath; }
|
||||
|
||||
inline InspectMessage_Struct& GetInspectMessage() { return _botInspectMessage; }
|
||||
|
||||
+2
-2
@@ -7036,7 +7036,7 @@ void Client::SetMaxXTargets(uint8 NewMax)
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
|
||||
char* Client::GetRacePlural(Client* client) {
|
||||
const char* Client::GetRacePlural(Client* client) {
|
||||
|
||||
switch (client->CastToMob()->GetRace()) {
|
||||
case HUMAN:
|
||||
@@ -7076,7 +7076,7 @@ char* Client::GetRacePlural(Client* client) {
|
||||
}
|
||||
}
|
||||
|
||||
char* Client::GetClassPlural(Client* client) {
|
||||
const char* Client::GetClassPlural(Client* client) {
|
||||
|
||||
switch (client->CastToMob()->GetClass()) {
|
||||
case WARRIOR:
|
||||
|
||||
+2
-2
@@ -1124,8 +1124,8 @@ public:
|
||||
void UpdateMercLevel();
|
||||
void CheckMercSuspendTimer();
|
||||
Timer GetMercTimer() { return merc_timer; };
|
||||
char* GetRacePlural(Client* client);
|
||||
char* GetClassPlural(Client* client);
|
||||
const char* GetRacePlural(Client* client);
|
||||
const char* GetClassPlural(Client* client);
|
||||
void SendWebLink(const char* website);
|
||||
|
||||
bool StoreTurnInItems(Mob* with);
|
||||
|
||||
+239
-239
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -3919,7 +3919,7 @@ void command_fixmob(Client *c, const Seperator *sep)
|
||||
uint32 DrakkinTattoo = target->GetDrakkinTattoo();
|
||||
uint32 DrakkinDetails = target->GetDrakkinDetails();
|
||||
|
||||
char* ChangeType = NULL; // If it's still NULL after processing, they didn't send a valid command
|
||||
const char* ChangeType = NULL; // If it's still NULL after processing, they didn't send a valid command
|
||||
uint32 ChangeSetting;
|
||||
char* command = sep->arg[1];
|
||||
|
||||
@@ -9566,8 +9566,8 @@ void command_object(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
// Save it here. We sometimes have need to refer to it in multiple places.
|
||||
char* usage_string = "Usage: #object List|Add|Edit|Move|Rotate|Save|Copy|Delete|Undo";
|
||||
|
||||
const char* usage_string = "Usage: #object List|Add|Edit|Move|Rotate|Save|Copy|Delete|Undo";
|
||||
|
||||
if ((!sep) || (sep->argnum == 0))
|
||||
{
|
||||
// Crash Suppressant: Shouldn't be able to get here, either, but fail gracefully if we do.
|
||||
@@ -11629,5 +11629,5 @@ void command_augmentitem(Client *c, const Seperator *sep)
|
||||
in_augment->augment_slot = -1;
|
||||
if(c->GetTradeskillObject() != NULL)
|
||||
Object::HandleAugmentation(c, in_augment, c->GetTradeskillObject());
|
||||
safe_delete(in_augment);
|
||||
safe_delete_array(in_augment);
|
||||
}
|
||||
|
||||
+2
-2
@@ -110,7 +110,7 @@ Doors::Doors(const char *dmodel, float dx, float dy, float dz, float dheading, u
|
||||
dest_heading = 0;
|
||||
|
||||
is_ldon_door = 0;
|
||||
client_version_mask = 4294967295;
|
||||
client_version_mask = 4294967295u;
|
||||
}
|
||||
|
||||
|
||||
@@ -788,4 +788,4 @@ void Doors::CreateDatabaseEntry()
|
||||
return;
|
||||
}
|
||||
database.InsertDoor(GetDoorDBID(), GetDoorID(), GetDoorName(), GetX(), GetY(), GetZ(), GetHeading(), GetOpenType(), GetGuildID(), GetLockpick(), GetKeyItem(), GetDoorParam(), GetInvertState(), GetIncline(), GetSize());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5124,7 +5124,7 @@ NPC* EntityList::GetClosestBanker(Mob* sender, uint32 &distance)
|
||||
if(!sender)
|
||||
return NULL;
|
||||
|
||||
distance = 4294967295;
|
||||
distance = 4294967295u;
|
||||
NPC* nc = NULL;
|
||||
|
||||
LinkedListIterator<NPC*> iterator(npc_list);
|
||||
|
||||
+3
-3
@@ -1791,7 +1791,7 @@ void Merc::AI_Process() {
|
||||
//now off hand
|
||||
if(GetTarget() && attack_dw_timer.Check() && CanThisClassDualWield()) {
|
||||
|
||||
int weapontype = NULL;
|
||||
int weapontype = 0; // No weapon type
|
||||
bool bIsFist = true;
|
||||
|
||||
if(bIsFist || ((weapontype != ItemType2HS) && (weapontype != ItemType2HPierce) && (weapontype != ItemType2HB))) {
|
||||
@@ -5959,7 +5959,7 @@ void NPC::LoadMercTypes(){
|
||||
mysql_free_result(DatasetResult);
|
||||
}
|
||||
|
||||
safe_delete(Query);
|
||||
safe_delete_array(Query);
|
||||
Query = 0;
|
||||
|
||||
if(!errorMessage.empty()) {
|
||||
@@ -5995,7 +5995,7 @@ void NPC::LoadMercs(){
|
||||
mysql_free_result(DatasetResult);
|
||||
}
|
||||
|
||||
safe_delete(Query);
|
||||
safe_delete_array(Query);
|
||||
Query = 0;
|
||||
|
||||
if(!errorMessage.empty()) {
|
||||
|
||||
@@ -494,8 +494,6 @@ int main(int argc, char** argv) {
|
||||
void CatchSignal(int sig_num) {
|
||||
#ifdef _WINDOWS
|
||||
_log(ZONE__INIT, "Recieved signal: %i", sig_num);
|
||||
#else
|
||||
_log(ZONE__INIT, "Recieved signal: %i in thread %d", sig_num, pthread_self());
|
||||
#endif
|
||||
RunLoops = false;
|
||||
}
|
||||
|
||||
+8
-3
@@ -1023,6 +1023,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
if (npc_type_id)
|
||||
{
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (id, name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) values(%i,\"%s\",%i,%i,%i,%i,%i,%i,%i,%f,%i,%i,%i,%f,%i,%i)", npc_type_id, tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28), errbuf, 0, 0, &npc_type_id)) {
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
return false;
|
||||
}
|
||||
@@ -1030,6 +1031,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
else
|
||||
{
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) values(\"%s\",%i,%i,%i,%i,%i,%i,%i,%f,%i,%i,%i,%f,%i,%i)", tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28), errbuf, 0, 0, &npc_type_id)) {
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
return false;
|
||||
}
|
||||
@@ -1038,18 +1040,21 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
safe_delete_array(query);
|
||||
snprintf(tmpstr, sizeof(tmpstr), "%s-%s", zone, spawn->GetName());
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawngroup (id, name) values(%i, '%s')", tmp, tmpstr), errbuf, 0, 0, &spawngroupid)) {
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
return false;
|
||||
}
|
||||
if(c) c->LogSQL(query);
|
||||
safe_delete_array(query);
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) values('%s', %u, %f, %f, %f, %i, %f, %i)", zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), 1200, spawn->GetHeading(), spawngroupid), errbuf, 0, 0, &tmp)) {
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
return false;
|
||||
}
|
||||
if(c) c->LogSQL(query);
|
||||
safe_delete_array(query);
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawnentry (spawngroupID, npcID, chance) values(%i, %i, %i)", spawngroupid, npc_type_id, 100), errbuf, 0)) {
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
return false;
|
||||
}
|
||||
@@ -1063,7 +1068,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
char tmpstr[64];
|
||||
snprintf(tmpstr, sizeof(tmpstr), "%s%s%i", zone, spawn->GetName(),Timer::GetCurrentTime());
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawngroup (name) values('%s')", tmpstr), errbuf, 0, 0, &last_insert_id)) {
|
||||
printf("ReturnFalse: spawngroup query in NPCSpawnDB() (query: %s)\n",query);
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
return false;
|
||||
}
|
||||
@@ -1079,16 +1084,16 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
else
|
||||
respawntime = 1200;
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) values('%s', %u, %f, %f, %f, %i, %f, %i)", zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), respawntime, spawn->GetHeading(), last_insert_id), errbuf, 0, 0, &spawnid)) {
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
printf("ReturnFalse: spawn2 query in NPCSpawnDB()\n");
|
||||
return false;
|
||||
}
|
||||
if(c) c->LogSQL(query);
|
||||
safe_delete_array(query);
|
||||
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawnentry (spawngroupID, npcID, chance) values(%i, %i, %i)", last_insert_id, tmp2, 100), errbuf, 0)) {
|
||||
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
|
||||
safe_delete(query);
|
||||
printf("ReturnFalse: spawnentry query in NPCSpawnDB()\n");
|
||||
return false;
|
||||
}
|
||||
if(c) c->LogSQL(query);
|
||||
|
||||
+1
-1
@@ -1094,7 +1094,7 @@ int Parser::LoadScript(int npcid, const char * zone, Mob* activater)
|
||||
buffer.replace(buffer.length()-1,buffer.length(),"");
|
||||
int heh = ParseCommands(buffer,line_num,0,0,0,0,filename);
|
||||
if (!heh){
|
||||
safe_delete_array(NewEventList);
|
||||
safe_delete(NewEventList);
|
||||
return 0;
|
||||
}
|
||||
event1->command = buffer;
|
||||
|
||||
@@ -47,9 +47,9 @@ XS(XS_PerlPacket_new)
|
||||
if (items < 1 || items > 3)
|
||||
Perl_croak(aTHX_ "Usage: PerlPacket::new(CLASS, opcode= \"OP_Unknown\", len= 0)");
|
||||
{
|
||||
char * CLASS = (char *)SvPV_nolen(ST(0));
|
||||
PerlPacket * RETVAL;
|
||||
char * opcode;
|
||||
char *CLASS = (char *)SvPV_nolen(ST(0));
|
||||
PerlPacket *RETVAL;
|
||||
const char *opcode;
|
||||
uint32 len;
|
||||
|
||||
if (items < 2)
|
||||
|
||||
@@ -37,9 +37,6 @@ PerlPacket::~PerlPacket() {
|
||||
}
|
||||
|
||||
bool PerlPacket::SetOpcode(const char *opcode) {
|
||||
#ifndef WIN32
|
||||
#warning Rewrite this!
|
||||
#endif
|
||||
op = OP_Unknown;
|
||||
// op = ZoneOpcodeManager->NameSearch(opcode);
|
||||
return(op != OP_Unknown);
|
||||
@@ -69,9 +66,6 @@ void PerlPacket::SendTo(Client *who) {
|
||||
if(len > 0)
|
||||
memcpy(outapp->pBuffer, packet, len);
|
||||
|
||||
#ifndef WIN32
|
||||
#warning Rewrite this!
|
||||
#endif
|
||||
// printf("Created this packet with PerlPacket: OP: %s\n", ZoneOpcodeManager->EmuToName(op));
|
||||
DumpPacket(outapp);
|
||||
|
||||
|
||||
+4
-1
@@ -3689,7 +3689,10 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
|
||||
if(!IsValidSpell(spell_id))
|
||||
return true;
|
||||
|
||||
|
||||
if(IsBeneficialSpell(spell_id) && (caster->GetNPCTypeID())) //then skip the rest, stop NPCs aggroing each other with buff spells. 2013-03-05
|
||||
return false;
|
||||
|
||||
if(IsMezSpell(spell_id))
|
||||
{
|
||||
if(SpecAttacks[UNMEZABLE]) {
|
||||
|
||||
Reference in New Issue
Block a user