mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 08:21:28 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
97e1963674
@ -1,5 +1,22 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 05/17/2014 ==
|
||||||
|
Secrets: Identified the opcode/struct for guild ranks in Rain of Fear+ clients.
|
||||||
|
Secrets: Implemented a work-around for Rain of Fear clients to have all guild permissions until proper database support is added for newer ranks.
|
||||||
|
|
||||||
|
== 05/14/2014 ==
|
||||||
|
Kayen: Rooted NPC's will no longer target players with Divine Aura effect if they are the closest target and other targets exist on the hate list.
|
||||||
|
|
||||||
|
== 05/12/2014 ==
|
||||||
|
Uleat: Re-arranged functions in Item.cpp to somewhat match the order they are declared in Item.h. Should make finding their location a little easier when using declarations as a guide. (This will facilitate readability of an upcoming change...)
|
||||||
|
|
||||||
|
== 05/07/2014 ==
|
||||||
|
Kayen: AA/Item/Spells that allow pets to critical and flurry will now work on the owners swarm pets consistent with live.
|
||||||
|
|
||||||
|
== 05/05/2014 ==
|
||||||
|
Uleat: Oops! Wrong state check (conn_state != client_state)
|
||||||
|
Uleat: Test fix to eliminate seemingly random crashes when an AE spell is being used. (Possible access to uninstantiated pointers during client connection process when someone casts a beneficial AE spell within range of a connecting client.)
|
||||||
|
|
||||||
== 04/29/2014 ==
|
== 04/29/2014 ==
|
||||||
KLS: Implemented new map code based on some of Derision's earlier work. Old maps still work with this system and don't need to be regenerated. We're still working on a new azone solution for better/more efficient maps.
|
KLS: Implemented new map code based on some of Derision's earlier work. Old maps still work with this system and don't need to be regenerated. We're still working on a new azone solution for better/more efficient maps.
|
||||||
|
|
||||||
|
|||||||
2772
common/Item.cpp
2772
common/Item.cpp
File diff suppressed because it is too large
Load Diff
@ -170,13 +170,13 @@ public:
|
|||||||
// Remove item from inventory (and take control of memory)
|
// Remove item from inventory (and take control of memory)
|
||||||
ItemInst* PopItem(int16 slot_id);
|
ItemInst* PopItem(int16 slot_id);
|
||||||
|
|
||||||
// Check whether item exists in inventory
|
|
||||||
// where argument specifies OR'd list of invWhere constants to look
|
|
||||||
int16 HasItem(uint32 item_id, uint8 quantity=0, uint8 where=0xFF);
|
|
||||||
|
|
||||||
// Check whether there is space for the specified number of the specified item.
|
// Check whether there is space for the specified number of the specified item.
|
||||||
bool HasSpaceForItem(const Item_Struct *ItemToTry, int16 Quantity);
|
bool HasSpaceForItem(const Item_Struct *ItemToTry, int16 Quantity);
|
||||||
|
|
||||||
|
// Check whether item exists in inventory
|
||||||
|
// where argument specifies OR'd list of invWhere constants to look
|
||||||
|
int16 HasItem(uint32 item_id, uint8 quantity = 0, uint8 where = 0xFF);
|
||||||
|
|
||||||
// Check whether item exists in inventory
|
// Check whether item exists in inventory
|
||||||
// where argument specifies OR'd list of invWhere constants to look
|
// where argument specifies OR'd list of invWhere constants to look
|
||||||
int16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF);
|
int16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF);
|
||||||
@ -265,22 +265,7 @@ public:
|
|||||||
|
|
||||||
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
||||||
|
|
||||||
ItemInst(ItemInstTypes use_type) {
|
ItemInst(ItemInstTypes use_type);
|
||||||
m_use_type = use_type;
|
|
||||||
m_item = nullptr;
|
|
||||||
m_charges = 0;
|
|
||||||
m_price = 0;
|
|
||||||
m_instnodrop = false;
|
|
||||||
m_merchantslot = 0;
|
|
||||||
m_color = 0;
|
|
||||||
|
|
||||||
m_exp = 0;
|
|
||||||
m_evolveLvl = 0;
|
|
||||||
m_activated = false;
|
|
||||||
m_scaledItem = nullptr;
|
|
||||||
m_evolveInfo = nullptr;
|
|
||||||
m_scaling = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemInst(const ItemInst& copy);
|
ItemInst(const ItemInst& copy);
|
||||||
|
|
||||||
@ -314,7 +299,7 @@ public:
|
|||||||
uint32 GetItemID(uint8 slot) const;
|
uint32 GetItemID(uint8 slot) const;
|
||||||
inline const ItemInst* operator[](uint8 slot) const { return GetItem(slot); }
|
inline const ItemInst* operator[](uint8 slot) const { return GetItem(slot); }
|
||||||
void PutItem(uint8 slot, const ItemInst& inst);
|
void PutItem(uint8 slot, const ItemInst& inst);
|
||||||
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id);
|
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id) { return; } // not defined anywhere...
|
||||||
void DeleteItem(uint8 slot);
|
void DeleteItem(uint8 slot);
|
||||||
ItemInst* PopItem(uint8 index);
|
ItemInst* PopItem(uint8 index);
|
||||||
void Clear();
|
void Clear();
|
||||||
@ -368,11 +353,11 @@ public:
|
|||||||
void SetInstNoDrop(bool flag) { m_instnodrop=flag; }
|
void SetInstNoDrop(bool flag) { m_instnodrop=flag; }
|
||||||
|
|
||||||
std::string GetCustomDataString() const;
|
std::string GetCustomDataString() const;
|
||||||
|
std::string GetCustomData(std::string identifier);
|
||||||
void SetCustomData(std::string identifier, std::string value);
|
void SetCustomData(std::string identifier, std::string value);
|
||||||
void SetCustomData(std::string identifier, int value);
|
void SetCustomData(std::string identifier, int value);
|
||||||
void SetCustomData(std::string identifier, float value);
|
void SetCustomData(std::string identifier, float value);
|
||||||
void SetCustomData(std::string identifier, bool value);
|
void SetCustomData(std::string identifier, bool value);
|
||||||
std::string GetCustomData(std::string identifier);
|
|
||||||
void DeleteCustomData(std::string identifier);
|
void DeleteCustomData(std::string identifier);
|
||||||
|
|
||||||
// Allows treatment of this object as though it were a pointer to m_item
|
// Allows treatment of this object as though it were a pointer to m_item
|
||||||
|
|||||||
@ -3163,6 +3163,26 @@ struct GuildUpdateURLAndChannel_Struct
|
|||||||
/*4176*/
|
/*4176*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Case 5 in Rain of Fear and higher clients for guild permissions.
|
||||||
|
//RankID is the internal guild rank. There are 8 in Rain of Fear as opposed to the 3 in Titanium.
|
||||||
|
//PermissionID is the type of permission. There are 32 total, with some unused. Live May 2014 sends and uses 26 of them. Varies through client version.
|
||||||
|
//Permission value is a char that is either 0 or 1. Enabled for that rank/disabled for that rank.
|
||||||
|
//The client sends this struct on changing a guild rank. The server sends each rank in 32 or less packets upon zonein if you are in a guild.
|
||||||
|
struct GuildUpdateRanks_Struct
|
||||||
|
{
|
||||||
|
/*0000*/ uint32 Action; // 0 = Update URL, 1 = Update Channel, 5 = RoF Ranks
|
||||||
|
/*0004*/ uint32 Unknown0004; //Seen 00 00 00 00
|
||||||
|
/*0008*/ uint32 Unknown0008; //Seen 96 29 00 00
|
||||||
|
/*0008*/ char Unknown0012[64]; //Seen "CharacterName"
|
||||||
|
/*0076*/ uint32 GuildID; //Guild ID of "CharacterName"
|
||||||
|
/*0080*/ uint32 RankID;
|
||||||
|
/*0084*/ uint32 PermissionID;
|
||||||
|
/*0088*/ char PermissionVal;
|
||||||
|
/*0089*/ char Unknown0089[3]; //Seen 2c 01 00 ?
|
||||||
|
/*0092*/
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct GuildStatus_Struct
|
struct GuildStatus_Struct
|
||||||
{
|
{
|
||||||
/*000*/ char Name[64];
|
/*000*/ char Name[64];
|
||||||
|
|||||||
@ -2011,7 +2011,7 @@ void SharedDatabase::LoadLootDrops(void *data, uint32 size) {
|
|||||||
current_id = id;
|
current_id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(current_entry > 1260) {
|
if(current_entry >= 1260) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
utils/sql/git/optional/2014_04_23_FocusComabtProcs.sql
Normal file
1
utils/sql/git/optional/2014_04_23_FocusComabtProcs.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:FocusCombatProcs', 'false', 'Allow all combat procs to receive focus (ignores focus limit).');
|
||||||
@ -1213,11 +1213,18 @@ void Mob::AI_Process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsPet()) {
|
if (IsPet() || (IsNPC() && CastToNPC()->GetSwarmOwner())) {
|
||||||
Mob *owner = GetOwner();
|
Mob *owner = nullptr;
|
||||||
|
|
||||||
|
if (IsPet())
|
||||||
|
owner = GetOwner();
|
||||||
|
else
|
||||||
|
owner = entity_list.GetMobID(CastToNPC()->GetSwarmOwner());
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
int16 flurry_chance = owner->aabonuses.PetFlurry +
|
int16 flurry_chance = owner->aabonuses.PetFlurry +
|
||||||
owner->spellbonuses.PetFlurry + owner->itembonuses.PetFlurry;
|
owner->spellbonuses.PetFlurry + owner->itembonuses.PetFlurry;
|
||||||
|
|
||||||
if (flurry_chance && (MakeRandomInt(0, 99) < flurry_chance))
|
if (flurry_chance && (MakeRandomInt(0, 99) < flurry_chance))
|
||||||
Flurry(nullptr);
|
Flurry(nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,10 +165,10 @@ bool QuestParserCollection::PlayerHasQuestSubLocal(QuestEventID evt) {
|
|||||||
bool QuestParserCollection::PlayerHasQuestSubGlobal(QuestEventID evt) {
|
bool QuestParserCollection::PlayerHasQuestSubGlobal(QuestEventID evt) {
|
||||||
if(_global_player_quest_status == QuestUnloaded) {
|
if(_global_player_quest_status == QuestUnloaded) {
|
||||||
std::string filename;
|
std::string filename;
|
||||||
QuestInterface *qi = GetQIByPlayerQuest(filename);
|
QuestInterface *qi = GetQIByGlobalPlayerQuest(filename);
|
||||||
if(qi) {
|
if(qi) {
|
||||||
_global_player_quest_status = qi->GetIdentifier();
|
_global_player_quest_status = qi->GetIdentifier();
|
||||||
qi->LoadPlayerScript(filename);
|
qi->LoadGlobalPlayerScript(filename);
|
||||||
return qi->GlobalPlayerHasQuestSub(evt);
|
return qi->GlobalPlayerHasQuestSub(evt);
|
||||||
}
|
}
|
||||||
} else if(_global_player_quest_status != QuestFailedToLoad) {
|
} else if(_global_player_quest_status != QuestFailedToLoad) {
|
||||||
|
|||||||
@ -318,7 +318,7 @@ bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 c
|
|||||||
chancetohit = mod_hit_chance(chancetohit, skillinuse, attacker);
|
chancetohit = mod_hit_chance(chancetohit, skillinuse, attacker);
|
||||||
|
|
||||||
// Chance to hit; Max 95%, Min 30%
|
// Chance to hit; Max 95%, Min 30%
|
||||||
if(chancetohit > 1000) {
|
if(chancetohit > 1000 || chancetohit < -1000) {
|
||||||
//if chance to hit is crazy high, that means a discipline is in use, and let it stay there
|
//if chance to hit is crazy high, that means a discipline is in use, and let it stay there
|
||||||
}
|
}
|
||||||
else if(chancetohit > 95) {
|
else if(chancetohit > 95) {
|
||||||
@ -4226,11 +4226,13 @@ void Mob::TryPetCriticalHit(Mob *defender, uint16 skill, int32 &damage)
|
|||||||
if (damage < 1) //We can't critical hit if we don't hit.
|
if (damage < 1) //We can't critical hit if we don't hit.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IsPet())
|
if (IsPet())
|
||||||
|
owner = GetOwner();
|
||||||
|
else if ((IsNPC() && CastToNPC()->GetSwarmOwner()))
|
||||||
|
owner = entity_list.GetMobID(CastToNPC()->GetSwarmOwner());
|
||||||
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
owner = GetOwner();
|
|
||||||
|
|
||||||
if (!owner)
|
if (!owner)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -4267,7 +4269,7 @@ void Mob::TryCriticalHit(Mob *defender, uint16 skill, int32 &damage, ExtraAttack
|
|||||||
|
|
||||||
// decided to branch this into it's own function since it's going to be duplicating a lot of the
|
// decided to branch this into it's own function since it's going to be duplicating a lot of the
|
||||||
// code in here, but could lead to some confusion otherwise
|
// code in here, but could lead to some confusion otherwise
|
||||||
if (IsPet() && GetOwner()->IsClient()) {
|
if (IsPet() && GetOwner()->IsClient() || (IsNPC() && CastToNPC()->GetSwarmOwner())) {
|
||||||
TryPetCriticalHit(defender,skill,damage);
|
TryPetCriticalHit(defender,skill,damage);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4456,6 +4458,7 @@ void Mob::DoRiposte(Mob* defender) {
|
|||||||
|
|
||||||
//Double Riposte effect, allows for a chance to do RIPOSTE with a skill specfic special attack (ie Return Kick).
|
//Double Riposte effect, allows for a chance to do RIPOSTE with a skill specfic special attack (ie Return Kick).
|
||||||
//Coded narrowly: Limit to one per client. Limit AA only. [1 = Skill Attack Chance, 2 = Skill]
|
//Coded narrowly: Limit to one per client. Limit AA only. [1 = Skill Attack Chance, 2 = Skill]
|
||||||
|
|
||||||
DoubleRipChance = defender->aabonuses.GiveDoubleRiposte[1];
|
DoubleRipChance = defender->aabonuses.GiveDoubleRiposte[1];
|
||||||
|
|
||||||
if(DoubleRipChance && (DoubleRipChance >= MakeRandomInt(0, 100))) {
|
if(DoubleRipChance && (DoubleRipChance >= MakeRandomInt(0, 100))) {
|
||||||
|
|||||||
@ -2151,28 +2151,40 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
|
|||||||
|
|
||||||
case SE_LimitHPPercent:
|
case SE_LimitHPPercent:
|
||||||
{
|
{
|
||||||
if(newbon->HPPercCap != 0 && newbon->HPPercCap > effect_value)
|
if(newbon->HPPercCap[0] != 0 && newbon->HPPercCap[0] > effect_value){
|
||||||
newbon->HPPercCap = effect_value;
|
newbon->HPPercCap[0] = effect_value;
|
||||||
else if(newbon->HPPercCap == 0)
|
newbon->HPPercCap[1] = base2;
|
||||||
newbon->HPPercCap = effect_value;
|
}
|
||||||
|
else if(newbon->HPPercCap[0] == 0){
|
||||||
|
newbon->HPPercCap[0] = effect_value;
|
||||||
|
newbon->HPPercCap[1] = base2;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SE_LimitManaPercent:
|
case SE_LimitManaPercent:
|
||||||
{
|
{
|
||||||
if(newbon->ManaPercCap != 0 && newbon->ManaPercCap > effect_value)
|
if(newbon->ManaPercCap[0] != 0 && newbon->ManaPercCap[0] > effect_value){
|
||||||
newbon->ManaPercCap = effect_value;
|
newbon->ManaPercCap[0] = effect_value;
|
||||||
else if(newbon->ManaPercCap == 0)
|
newbon->ManaPercCap[1] = base2;
|
||||||
newbon->ManaPercCap = effect_value;
|
}
|
||||||
|
else if(newbon->ManaPercCap[0] == 0) {
|
||||||
|
newbon->ManaPercCap[0] = effect_value;
|
||||||
|
newbon->ManaPercCap[1] = base2;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SE_LimitEndPercent:
|
case SE_LimitEndPercent:
|
||||||
{
|
{
|
||||||
if(newbon->EndPercCap != 0 && newbon->EndPercCap > effect_value)
|
if(newbon->EndPercCap[0] != 0 && newbon->EndPercCap[0] > effect_value) {
|
||||||
newbon->EndPercCap = effect_value;
|
newbon->EndPercCap[0] = effect_value;
|
||||||
else if(newbon->EndPercCap == 0)
|
newbon->EndPercCap[1] = base2;
|
||||||
newbon->EndPercCap = effect_value;
|
}
|
||||||
|
|
||||||
|
else if(newbon->EndPercCap[0] == 0){
|
||||||
|
newbon->EndPercCap[0] = effect_value;
|
||||||
|
newbon->EndPercCap[1] = base2;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10649,10 +10649,10 @@ int32 Bot::CalcMaxHP() {
|
|||||||
if (cur_hp > max_hp)
|
if (cur_hp > max_hp)
|
||||||
cur_hp = max_hp;
|
cur_hp = max_hp;
|
||||||
|
|
||||||
int hp_perc_cap = spellbonuses.HPPercCap;
|
int hp_perc_cap = spellbonuses.HPPercCap[0];
|
||||||
if(hp_perc_cap) {
|
if(hp_perc_cap) {
|
||||||
int curHP_cap = (max_hp * hp_perc_cap) / 100;
|
int curHP_cap = (max_hp * hp_perc_cap) / 100;
|
||||||
if (cur_hp > curHP_cap)
|
if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1]))
|
||||||
cur_hp = curHP_cap;
|
cur_hp = curHP_cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10671,10 +10671,10 @@ int32 Bot::CalcMaxEndurance()
|
|||||||
cur_end = max_end;
|
cur_end = max_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
int end_perc_cap = spellbonuses.EndPercCap;
|
int end_perc_cap = spellbonuses.EndPercCap[0];
|
||||||
if(end_perc_cap) {
|
if(end_perc_cap) {
|
||||||
int curEnd_cap = (max_end * end_perc_cap) / 100;
|
int curEnd_cap = (max_end * end_perc_cap) / 100;
|
||||||
if (cur_end > curEnd_cap)
|
if (cur_end > curEnd_cap || (spellbonuses.EndPercCap[1] && cur_end > spellbonuses.EndPercCap[1]))
|
||||||
cur_end = curEnd_cap;
|
cur_end = curEnd_cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -621,6 +621,7 @@ public:
|
|||||||
void SendGuildURL();
|
void SendGuildURL();
|
||||||
void SendGuildChannel();
|
void SendGuildChannel();
|
||||||
void SendGuildSpawnAppearance();
|
void SendGuildSpawnAppearance();
|
||||||
|
void SendGuildRanks();
|
||||||
void SendGuildMembers();
|
void SendGuildMembers();
|
||||||
void SendGuildList();
|
void SendGuildList();
|
||||||
void SendGuildJoin(GuildJoin_Struct* gj);
|
void SendGuildJoin(GuildJoin_Struct* gj);
|
||||||
|
|||||||
@ -255,10 +255,10 @@ int32 Client::CalcMaxHP() {
|
|||||||
if (cur_hp > max_hp)
|
if (cur_hp > max_hp)
|
||||||
cur_hp = max_hp;
|
cur_hp = max_hp;
|
||||||
|
|
||||||
int hp_perc_cap = spellbonuses.HPPercCap;
|
int hp_perc_cap = spellbonuses.HPPercCap[0];
|
||||||
if(hp_perc_cap) {
|
if(hp_perc_cap) {
|
||||||
int curHP_cap = (max_hp * hp_perc_cap) / 100;
|
int curHP_cap = (max_hp * hp_perc_cap) / 100;
|
||||||
if (cur_hp > curHP_cap)
|
if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1]))
|
||||||
cur_hp = curHP_cap;
|
cur_hp = curHP_cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -950,10 +950,10 @@ int32 Client::CalcMaxMana()
|
|||||||
cur_mana = max_mana;
|
cur_mana = max_mana;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mana_perc_cap = spellbonuses.ManaPercCap;
|
int mana_perc_cap = spellbonuses.ManaPercCap[0];
|
||||||
if(mana_perc_cap) {
|
if(mana_perc_cap) {
|
||||||
int curMana_cap = (max_mana * mana_perc_cap) / 100;
|
int curMana_cap = (max_mana * mana_perc_cap) / 100;
|
||||||
if (cur_mana > curMana_cap)
|
if (cur_mana > curMana_cap || (spellbonuses.ManaPercCap[1] && cur_mana > spellbonuses.ManaPercCap[1]))
|
||||||
cur_mana = curMana_cap;
|
cur_mana = curMana_cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1890,10 +1890,10 @@ void Client::CalcMaxEndurance()
|
|||||||
cur_end = max_end;
|
cur_end = max_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
int end_perc_cap = spellbonuses.EndPercCap;
|
int end_perc_cap = spellbonuses.EndPercCap[0];
|
||||||
if(end_perc_cap) {
|
if(end_perc_cap) {
|
||||||
int curEnd_cap = (max_end * end_perc_cap) / 100;
|
int curEnd_cap = (max_end * end_perc_cap) / 100;
|
||||||
if (cur_end > curEnd_cap)
|
if (cur_end > curEnd_cap || (spellbonuses.EndPercCap[1] && cur_end > spellbonuses.EndPercCap[1]))
|
||||||
cur_end = curEnd_cap;
|
cur_end = curEnd_cap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4431,6 +4431,7 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
if(zone->GetZoneID() == RuleI(World, GuildBankZoneID) && GuildBanks)
|
if(zone->GetZoneID() == RuleI(World, GuildBankZoneID) && GuildBanks)
|
||||||
GuildBanks->SendGuildBank(this);
|
GuildBanks->SendGuildBank(this);
|
||||||
|
SendGuildRanks();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8128,7 +8129,10 @@ void Client::Handle_OP_ClientError(const EQApplicationPacket *app)
|
|||||||
void Client::Handle_OP_ReloadUI(const EQApplicationPacket *app)
|
void Client::Handle_OP_ReloadUI(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
if(IsInAGuild())
|
if(IsInAGuild())
|
||||||
|
{
|
||||||
|
SendGuildRanks();
|
||||||
SendGuildMembers();
|
SendGuildMembers();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9603,6 +9607,7 @@ void Client::CompleteConnect()
|
|||||||
|
|
||||||
if(IsInAGuild())
|
if(IsInAGuild())
|
||||||
{
|
{
|
||||||
|
SendGuildRanks();
|
||||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), zone->GetZoneID(), time(nullptr));
|
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), zone->GetZoneID(), time(nullptr));
|
||||||
guild_mgr.RequestOnlineGuildMembers(this->CharacterID(), this->GuildID());
|
guild_mgr.RequestOnlineGuildMembers(this->CharacterID(), this->GuildID());
|
||||||
}
|
}
|
||||||
@ -12528,6 +12533,7 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
if(zone->GetZoneID() == RuleI(World, GuildBankZoneID) && GuildBanks)
|
if(zone->GetZoneID() == RuleI(World, GuildBankZoneID) && GuildBanks)
|
||||||
GuildBanks->SendGuildBank(this);
|
GuildBanks->SendGuildBank(this);
|
||||||
|
SendGuildRanks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
332
zone/command.cpp
332
zone/command.cpp
@ -6594,41 +6594,56 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
if ( strcasecmp( sep->arg[1], "help" ) == 0 ) {
|
if ( strcasecmp( sep->arg[1], "help" ) == 0 ) {
|
||||||
|
|
||||||
c->Message(0, "Help File for #npcedit. Syntax for commands are:");
|
c->Message(0, "Help File for #npcedit. Syntax for commands are:");
|
||||||
c->Message(0, "#npcedit Name - Sets an NPCs name");
|
c->Message(0, "#npcedit Name - Sets an NPC's name");
|
||||||
c->Message(0, "#npcedit Lastname - Sets an NPCs lastname");
|
c->Message(0, "#npcedit Lastname - Sets an NPC's lastname");
|
||||||
c->Message(0, "#npcedit Level - Sets an NPCs level");
|
c->Message(0, "#npcedit Level - Sets an NPC's level");
|
||||||
c->Message(0, "#npcedit Race - Sets an NPCs race");
|
c->Message(0, "#npcedit Maxlevel - Sets an NPC's maximum level");
|
||||||
c->Message(0, "#npcedit Class - Sets an NPCs class");
|
c->Message(0, "#npcedit Race - Sets an NPC's race");
|
||||||
c->Message(0, "#npcedit Bodytype - Sets an NPCs bodytype");
|
c->Message(0, "#npcedit Class - Sets an NPC's class");
|
||||||
c->Message(0, "#npcedit HP - Sets an NPCs hitpoints");
|
c->Message(0, "#npcedit Bodytype - Sets an NPC's bodytype");
|
||||||
c->Message(0, "#npcedit Gender - Sets an NPCs gender");
|
c->Message(0, "#npcedit HP - Sets an NPC's hitpoints");
|
||||||
c->Message(0, "#npcedit Texture - Sets an NPCs texture");
|
c->Message(0, "#npcedit Gender - Sets an NPC's gender");
|
||||||
c->Message(0, "#npcedit Helmtexture - Sets an NPCs helmtexture");
|
c->Message(0, "#npcedit Texture - Sets an NPC's texture");
|
||||||
c->Message(0, "#npcedit Size - Sets an NPCs size");
|
c->Message(0, "#npcedit Helmtexture - Sets an NPC's helmtexture");
|
||||||
c->Message(0, "#npcedit Hpregen - Sets an NPCs hitpoint regen rate per tick");
|
c->Message(0, "#npcedit Size - Sets an NPC's size");
|
||||||
c->Message(0, "#npcedit Manaregen - Sets an NPCs mana regen rate per tick");
|
c->Message(0, "#npcedit Hpregen - Sets an NPC's hitpoint regen rate per tick");
|
||||||
c->Message(0, "#npcedit Loottable - Sets the lootable ID for an NPC ");
|
c->Message(0, "#npcedit Manaregen - Sets an NPC's mana regen rate per tick");
|
||||||
|
c->Message(0, "#npcedit Loottable - Sets the loottable ID for an NPC ");
|
||||||
c->Message(0, "#npcedit Merchantid - Sets the merchant ID for an NPC");
|
c->Message(0, "#npcedit Merchantid - Sets the merchant ID for an NPC");
|
||||||
c->Message(0, "#npcedit alt_currency_id - Sets the Alternate Currency ID for an alterative currency Merchant");
|
c->Message(0, "#npcedit alt_currency_id - Sets the Alternate Currency ID for an alterative currency Merchant");
|
||||||
|
c->Message(0, "#npcedit npc_spells_effects_id - Sets the NPC Spell Effects ID");
|
||||||
|
c->Message(0, "#npcedit adventure_template_id - Sets the NPC's Adventure Template ID");
|
||||||
|
c->Message(0, "#npcedit trap_template - Sets the NPC's Trap Template ID");
|
||||||
|
c->Message(0, "#npcedit special_abilities - Sets the NPC's Special Abilities");
|
||||||
c->Message(0, "#npcedit Spell - Sets the npc spells list ID for an NPC");
|
c->Message(0, "#npcedit Spell - Sets the npc spells list ID for an NPC");
|
||||||
c->Message(0, "#npcedit Faction - Sets the NPCs faction id");
|
c->Message(0, "#npcedit Faction - Sets the NPC's faction id");
|
||||||
c->Message(0, "#npcedit Mindmg - Sets an NPCs minimum damage");
|
c->Message(0, "#npcedit Mindmg - Sets an NPC's minimum damage");
|
||||||
c->Message(0, "#npcedit Maxdmg - Sets an NPCs maximum damage");
|
c->Message(0, "#npcedit Maxdmg - Sets an NPC's maximum damage");
|
||||||
c->Message(0, "#npcedit Aggroradius - Sets an NPCs aggro radius");
|
c->Message(0, "#npcedit Aggroradius - Sets an NPC's aggro radius");
|
||||||
c->Message(0, "#npcedit Assistradius - Sets an NPCs assist radius");
|
c->Message(0, "#npcedit Assistradius - Sets an NPC's assist radius");
|
||||||
c->Message(0, "#npcedit Social - Set to 1 if an NPC should assist others on its faction");
|
c->Message(0, "#npcedit Social - Set to 1 if an NPC should assist others on its faction");
|
||||||
c->Message(0, "#npcedit Runspeed - Sets an NPCs run speed");
|
c->Message(0, "#npcedit Runspeed - Sets an NPC's run speed");
|
||||||
c->Message(0, "#npcedit MR - Sets an NPCs magic resistance");
|
c->Message(0, "#npcedit AGI - Sets an NPC's Agility");
|
||||||
c->Message(0, "#npcedit PR - Sets an NPCs poisen resistance");
|
c->Message(0, "#npcedit CHA - Sets an NPC's Charisma");
|
||||||
c->Message(0, "#npcedit DR - Sets an NPCs disease resistance");
|
c->Message(0, "#npcedit DEX - Sets an NPC's Dexterity");
|
||||||
c->Message(0, "#npcedit FR - Sets an NPCs fire resistance");
|
c->Message(0, "#npcedit INT - Sets an NPC's Intelligence");
|
||||||
c->Message(0, "#npcedit CR - Sets an NPCs cold resistance");
|
c->Message(0, "#npcedit STA - Sets an NPC's Stamina");
|
||||||
c->Message(0, "#npcedit Corrup - Sets an NPCs corruption resistance");
|
c->Message(0, "#npcedit STR - Sets an NPC's Strength");
|
||||||
c->Message(0, "#npcedit Seeinvis - Sets an NPCs ability to see invis");
|
c->Message(0, "#npcedit WIS - Sets an NPC's Wisdom");
|
||||||
c->Message(0, "#npcedit Seeinvisundead - Sets an NPCs ability to see through invis vs. undead");
|
c->Message(0, "#npcedit MR - Sets an NPC's Magic Resistance");
|
||||||
c->Message(0, "#npcedit Seehide - Sets an NPCs ability to see through hide");
|
c->Message(0, "#npcedit PR - Sets an NPC's Poison Resistance");
|
||||||
c->Message(0, "#npcedit Seeimprovedhide - Sets an NPCs ability to see through improved hide");
|
c->Message(0, "#npcedit DR - Sets an NPC's Disease Resistance");
|
||||||
c->Message(0, "#npcedit AC - Sets an NPCs armor class");
|
c->Message(0, "#npcedit FR - Sets an NPC's Fire Resistance");
|
||||||
|
c->Message(0, "#npcedit CR - Sets an NPC's cold resistance");
|
||||||
|
c->Message(0, "#npcedit Corrup - Sets an NPC's Corruption Resistance");
|
||||||
|
c->Message(0, "#npcedit PhR - Sets and NPC's Physical Resistance");
|
||||||
|
c->Message(0, "#npcedit Seeinvis - Sets an NPC's ability to see invis");
|
||||||
|
c->Message(0, "#npcedit Seeinvisundead - Sets an NPC's ability to see through invis vs. undead");
|
||||||
|
c->Message(0, "#npcedit Seehide - Sets an NPC's ability to see through hide");
|
||||||
|
c->Message(0, "#npcedit Seeimprovedhide - Sets an NPC's ability to see through improved hide");
|
||||||
|
c->Message(0, "#npcedit AC - Sets an NPC's Armor Class");
|
||||||
|
c->Message(0, "#npcedit ATK - Sets an NPC's Attack");
|
||||||
|
c->Message(0, "#npcedit Accuracy - Sets an NPC's Accuracy");
|
||||||
c->Message(0, "#npcedit npcaggro - Sets an NPC's npc_aggro flag");
|
c->Message(0, "#npcedit npcaggro - Sets an NPC's npc_aggro flag");
|
||||||
c->Message(0, "#npcedit qglobal - Sets an NPC's quest global flag");
|
c->Message(0, "#npcedit qglobal - Sets an NPC's quest global flag");
|
||||||
c->Message(0, "#npcedit limit - Sets an NPC's spawn limit counter");
|
c->Message(0, "#npcedit limit - Sets an NPC's spawn limit counter");
|
||||||
@ -6637,15 +6652,21 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
c->Message(0, "#npcedit wep1 - Sets an NPC's primary weapon model");
|
c->Message(0, "#npcedit wep1 - Sets an NPC's primary weapon model");
|
||||||
c->Message(0, "#npcedit wep2 - Sets an NPC's secondary weapon model");
|
c->Message(0, "#npcedit wep2 - Sets an NPC's secondary weapon model");
|
||||||
c->Message(0, "#npcedit featuresave - Saves all current facial features to the database");
|
c->Message(0, "#npcedit featuresave - Saves all current facial features to the database");
|
||||||
c->Message(0, "#npcedit armortint_id - Set NPC Armor tint ID");
|
c->Message(0, "#npcedit color - Sets an NPC's red, green, and blue armor tint");
|
||||||
c->Message(0, "#npcedit setanimation - Set NPC's animation on spawn (Stored in spawn2 table)");
|
c->Message(0, "#npcedit armortint_id - Set an NPC's Armor tint ID");
|
||||||
|
c->Message(0, "#npcedit setanimation - Set an NPC's animation on spawn (Stored in spawn2 table)");
|
||||||
|
c->Message(0, "#npcedit scalerate - Set an NPC's scaling rate");
|
||||||
|
c->Message(0, "#npcedit healscale - Set an NPC's heal scaling rate");
|
||||||
|
c->Message(0, "#npcedit spellscale - Set an NPC's spell scaling rate");
|
||||||
|
c->Message(0, "#npcedit no_target - Set an NPC's ability to be targeted with the target hotkey");
|
||||||
|
c->Message(0, "#npcedit version - Set an NPC's version");
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "name" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "name" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has the name %s",c->GetTarget()->CastToNPC()->GetNPCTypeID(),(sep->argplus[2]));
|
c->Message(15,"NPCID %u now has the name %s.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),(sep->argplus[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set name='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set name='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6655,7 +6676,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has the lastname %s",c->GetTarget()->CastToNPC()->GetNPCTypeID(),(sep->argplus[2]));
|
c->Message(15,"NPCID %u now has the lastname %s.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),(sep->argplus[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set lastname='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set lastname='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6664,7 +6685,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has the race %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has the race %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set race=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set race=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6673,7 +6694,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u is now class %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u is now class %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set class=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set class=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6682,7 +6703,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has type %i bodytype ",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has type %i bodytype.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set bodytype=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set bodytype=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6691,7 +6712,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has %i Hitpoints",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has %i Hitpoints.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set hp=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set hp=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6700,7 +6721,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u is now gender %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u is now gender %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set gender=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set gender=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6709,7 +6730,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now uses texture %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now uses texture %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set texture=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set texture=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6718,7 +6739,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now uses helmtexture %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now uses helmtexture %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set helmtexture=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set helmtexture=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6727,7 +6748,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u is now size %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u is now size %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set size=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set size=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6736,7 +6757,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now regens %i hitpoints per tick",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now regens %i hitpoints per tick.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set hp_regen_rate=%i where hp_regen_rate=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set hp_regen_rate=%i where hp_regen_rate=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6745,7 +6766,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now regens %i mana per tick",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now regens %i mana per tick.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set mana_regen_rate=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set mana_regen_rate=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6754,7 +6775,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u is now on loottable_id %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u is now on loottable_id %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set loottable_id=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set loottable_id=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6763,7 +6784,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now is merchant_id %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u is now merchant_id %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set merchant_id=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set merchant_id=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6772,11 +6793,47 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has field 'alt_currency_id' set to %s",c->GetTarget()->CastToNPC()->GetNPCTypeID(), (sep->argplus[2]));
|
c->Message(15,"NPCID %u now has field 'alt_currency_id' set to %s.",c->GetTarget()->CastToNPC()->GetNPCTypeID(), (sep->argplus[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set alt_currency_id='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set alt_currency_id='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "npc_spells_effects_id" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has field 'npc_spells_effects_id' set to %s.",c->GetTarget()->CastToNPC()->GetNPCTypeID(), (sep->argplus[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set npc_spells_effects_id='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "adventure_template_id" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has field 'adventure_template_id' set to %s.",c->GetTarget()->CastToNPC()->GetNPCTypeID(), (sep->argplus[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set adventure_template_id='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "trap_template" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has field 'trap_template' set to %s.",c->GetTarget()->CastToNPC()->GetNPCTypeID(), (sep->argplus[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set trap_template='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "special_abilities" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has field 'special_abilities' set to %s.",c->GetTarget()->CastToNPC()->GetNPCTypeID(), (sep->argplus[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set special_abilities='%s' where id=%i",(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "spell" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "spell" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
@ -6849,11 +6906,74 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "AGI" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Agility.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set AGI=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "CHA" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Charisma.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set CHA=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "DEX" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Dexterity.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set DEX=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "INT" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Intelligence.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set _INT=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "STA" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Stamina.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set STA=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "STR" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Strength.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set STR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "WIS" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has a Magic Resistance of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set WIS=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "MR" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "MR" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has a magic resist of %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has a Magic Resistance of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set MR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set MR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6862,7 +6982,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has a disease resist of %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has a Disease Resistance of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set DR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set DR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6871,7 +6991,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has a cold resist of %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has a Cold Resistance of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set CR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set CR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6880,7 +7000,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has a fire resist of %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has a Fire Resistance of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set FR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set FR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6889,7 +7009,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has a poison resist of %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has a Poison Resistance of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set PR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set PR=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6898,16 +7018,25 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has a corruption resist of %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has a Corruption Resistance of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set corrup=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set corrup=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "PhR" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15, "NPCID %u now has a Physical Resistance of %i.", c->GetTarget()->CastToNPC()->GetNPCTypeID(), atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set PhR=%i where id=%i", atoi(sep->argplus[2]), c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "seeinvis" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "seeinvis" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has seeinvis set to %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has seeinvis set to %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_invis=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_invis=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6916,7 +7045,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has seeinvisundead set to %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has seeinvisundead set to %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_invis_undead=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_invis_undead=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6925,7 +7054,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has seehide set to %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has seehide set to %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_hide=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_hide=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6934,7 +7063,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has seeimprovedhide set to %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u now has seeimprovedhide set to %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_improved_hide=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set see_improved_hide=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
@ -6943,20 +7072,47 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u now has %i armor class",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->argplus[2]));
|
c->Message(15,"NPCID %u now has %i Armor Class.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->argplus[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set ac=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set ac=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "ATK" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Attack.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->argplus[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set atk=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "Accuracy" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i Accuracy.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->argplus[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set accuracy=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "level" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "level" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
c->Message(15,"NPCID %u is now level %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
c->Message(15,"NPCID %u is now level %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set level=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set level=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "maxlevel" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has a maximum level of %i.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set maxlevel=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "qglobal" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "qglobal" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
@ -7052,7 +7208,15 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "color" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has %i red, %i green, and %i blue tinting on their armor.", c->GetTarget()->CastToNPC()->GetNPCTypeID(), atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set armortint_red=%i, armortint_green=%i, armortint_blue=%i where id=%i", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "armortint_id" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "armortint_id" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
@ -7096,6 +7260,51 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "scalerate" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15, "NPCID %u now has a scaling rate of %i.", c->GetTarget()->CastToNPC()->GetNPCTypeID(), atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set scalerate=%i where id=%i", atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "healscale" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15, "NPCID %u now has a heal scaling rate of %i.", c->GetTarget()->CastToNPC()->GetNPCTypeID(), atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set healscale=%i where id=%i", atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "spellscale" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15, "NPCID %u now has a spell scaling rate of %i.", c->GetTarget()->CastToNPC()->GetNPCTypeID(), atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set spellscale=%i where id=%i", atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "no_target" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15, "NPCID %u is now %s.", c->GetTarget()->CastToNPC()->GetNPCTypeID(), atoi(sep->arg[2]) == 0 ? "targetable" : "untargetable");
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set no_target_hotkey=%i where id=%i", atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "version" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15, "NPCID %u is now version %i.", c->GetTarget()->CastToNPC()->GetNPCTypeID(), atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set version=%i where id=%i", atoi(sep->arg[2]), c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
|
|
||||||
else if((sep->arg[1][0] == 0 || strcasecmp(sep->arg[1],"*")==0) || ((c->GetTarget()==0) || (c->GetTarget()->IsClient())))
|
else if((sep->arg[1][0] == 0 || strcasecmp(sep->arg[1],"*")==0) || ((c->GetTarget()==0) || (c->GetTarget()->IsClient())))
|
||||||
{
|
{
|
||||||
@ -11507,4 +11716,3 @@ void command_merchantcloseshop(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
merchant->CastToNPC()->MerchantCloseShop();
|
merchant->CastToNPC()->MerchantCloseShop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -310,9 +310,9 @@ struct StatBonuses {
|
|||||||
int16 IncreaseBlockChance; // overall block chance modifier
|
int16 IncreaseBlockChance; // overall block chance modifier
|
||||||
uint16 PersistantCasting; // chance to continue casting through a stun
|
uint16 PersistantCasting; // chance to continue casting through a stun
|
||||||
int XPRateMod; //i
|
int XPRateMod; //i
|
||||||
int HPPercCap; //Spell effect that limits you to being healed/regening beyond a % of your max
|
int HPPercCap[2]; //Spell effect that limits you to being healed/regening beyond a % of your max
|
||||||
int ManaPercCap; // ^^
|
int ManaPercCap[2]; // ^^ 0 = % Cap 1 = Flat Amount Cap
|
||||||
int EndPercCap; // ^^
|
int EndPercCap[2]; // ^^
|
||||||
bool BlockNextSpell; // Indicates whether the client can block a spell or not
|
bool BlockNextSpell; // Indicates whether the client can block a spell or not
|
||||||
//uint16 BlockSpellEffect[EFFECT_COUNT]; // Prevents spells with certain effects from landing on you *no longer used
|
//uint16 BlockSpellEffect[EFFECT_COUNT]; // Prevents spells with certain effects from landing on you *no longer used
|
||||||
bool ImmuneToFlee; // Bypass the fleeing flag
|
bool ImmuneToFlee; // Bypass the fleeing flag
|
||||||
|
|||||||
@ -748,6 +748,9 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
|||||||
|
|
||||||
for (auto it = mob_list.begin(); it != mob_list.end(); ++it) {
|
for (auto it = mob_list.begin(); it != mob_list.end(); ++it) {
|
||||||
curmob = it->second;
|
curmob = it->second;
|
||||||
|
// test to fix possible cause of random zone crashes..external methods accessing client properties before they're initialized
|
||||||
|
if (curmob->IsClient() && !curmob->CastToClient()->ClientFinishedLoading())
|
||||||
|
continue;
|
||||||
if (curmob == center) //do not affect center
|
if (curmob == center) //do not affect center
|
||||||
continue;
|
continue;
|
||||||
if (curmob == caster && !affect_caster) //watch for caster too
|
if (curmob == caster && !affect_caster) //watch for caster too
|
||||||
|
|||||||
@ -115,6 +115,42 @@ void Client::SendGuildChannel()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Client::SendGuildRanks()
|
||||||
|
{
|
||||||
|
if(GetClientVersion() < EQClientRoF)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int permissions = 30 + 1; //Static number of permissions in all EQ clients as of May 2014
|
||||||
|
int ranks = 8 + 1; // Static number of RoF+ ranks as of May 2014
|
||||||
|
int j = 1;
|
||||||
|
int i = 1;
|
||||||
|
if(IsInAGuild())
|
||||||
|
{
|
||||||
|
while(j < ranks)
|
||||||
|
{
|
||||||
|
while(i < permissions)
|
||||||
|
{
|
||||||
|
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildUpdateURLAndChannel, sizeof(GuildUpdateRanks_Struct));
|
||||||
|
GuildUpdateRanks_Struct *guuacs = (GuildUpdateRanks_Struct*) outapp->pBuffer;
|
||||||
|
//guuacs->Unknown0008 = this->GuildID();
|
||||||
|
strncpy(guuacs->Unknown0012, this->GetCleanName(), 64);
|
||||||
|
guuacs->Action = 5;
|
||||||
|
guuacs->RankID = j;
|
||||||
|
guuacs->GuildID = this->GuildID();
|
||||||
|
guuacs->PermissionID = i;
|
||||||
|
guuacs->PermissionVal = 1;
|
||||||
|
guuacs->Unknown0089[0] = 0x2c;
|
||||||
|
guuacs->Unknown0089[1] = 0x01;
|
||||||
|
guuacs->Unknown0089[2] = 0x00;
|
||||||
|
FastQueuePacket(&outapp);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
i = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Client::SendGuildSpawnAppearance() {
|
void Client::SendGuildSpawnAppearance() {
|
||||||
if (!IsInAGuild()) {
|
if (!IsInAGuild()) {
|
||||||
// clear guildtag
|
// clear guildtag
|
||||||
|
|||||||
@ -163,7 +163,7 @@ Mob* HateList::GetClosest(Mob *hater) {
|
|||||||
++iterator;
|
++iterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (close == 0 && hater->IsNPC())
|
if (close == 0 && hater->IsNPC() || close->DivineAura())
|
||||||
close = hater->CastToNPC()->GetHateTop();
|
close = hater->CastToNPC()->GetHateTop();
|
||||||
|
|
||||||
return close;
|
return close;
|
||||||
|
|||||||
@ -917,10 +917,10 @@ int32 Merc::CalcMaxHP() {
|
|||||||
if (cur_hp > max_hp)
|
if (cur_hp > max_hp)
|
||||||
cur_hp = max_hp;
|
cur_hp = max_hp;
|
||||||
|
|
||||||
int hp_perc_cap = spellbonuses.HPPercCap;
|
int hp_perc_cap = spellbonuses.HPPercCap[0];
|
||||||
if(hp_perc_cap) {
|
if(hp_perc_cap) {
|
||||||
int curHP_cap = (max_hp * hp_perc_cap) / 100;
|
int curHP_cap = (max_hp * hp_perc_cap) / 100;
|
||||||
if (cur_hp > curHP_cap)
|
if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1]))
|
||||||
cur_hp = curHP_cap;
|
cur_hp = curHP_cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,10 +959,10 @@ int32 Merc::CalcMaxMana()
|
|||||||
cur_mana = max_mana;
|
cur_mana = max_mana;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mana_perc_cap = spellbonuses.ManaPercCap;
|
int mana_perc_cap = spellbonuses.ManaPercCap[0];
|
||||||
if(mana_perc_cap) {
|
if(mana_perc_cap) {
|
||||||
int curMana_cap = (max_mana * mana_perc_cap) / 100;
|
int curMana_cap = (max_mana * mana_perc_cap) / 100;
|
||||||
if (cur_mana > curMana_cap)
|
if (cur_mana > curMana_cap || (spellbonuses.ManaPercCap[1] && cur_mana > spellbonuses.ManaPercCap[1]))
|
||||||
cur_mana = curMana_cap;
|
cur_mana = curMana_cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1054,10 +1054,10 @@ void Merc::CalcMaxEndurance()
|
|||||||
cur_end = max_end;
|
cur_end = max_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
int end_perc_cap = spellbonuses.EndPercCap;
|
int end_perc_cap = spellbonuses.EndPercCap[0];
|
||||||
if(end_perc_cap) {
|
if(end_perc_cap) {
|
||||||
int curEnd_cap = (max_end * end_perc_cap) / 100;
|
int curEnd_cap = (max_end * end_perc_cap) / 100;
|
||||||
if (cur_end > curEnd_cap)
|
if (cur_end > curEnd_cap || (spellbonuses.EndPercCap[1] && cur_end > spellbonuses.EndPercCap[1]))
|
||||||
cur_end = curEnd_cap;
|
cur_end = curEnd_cap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -351,19 +351,14 @@ void Client::OPCombatAbility(const EQApplicationPacket *app) {
|
|||||||
|
|
||||||
//Live AA - Technique of Master Wu
|
//Live AA - Technique of Master Wu
|
||||||
uint16 bDoubleSpecialAttack = itembonuses.DoubleSpecialAttack + spellbonuses.DoubleSpecialAttack + aabonuses.DoubleSpecialAttack;
|
uint16 bDoubleSpecialAttack = itembonuses.DoubleSpecialAttack + spellbonuses.DoubleSpecialAttack + aabonuses.DoubleSpecialAttack;
|
||||||
if( bDoubleSpecialAttack && (bDoubleSpecialAttack >= 100 || bDoubleSpecialAttack > MakeRandomInt(0,100)) ) {
|
if (bDoubleSpecialAttack && (bDoubleSpecialAttack >= 100 || bDoubleSpecialAttack > MakeRandomInt(0, 99))) {
|
||||||
|
|
||||||
int MonkSPA [5] = { SkillFlyingKick, SkillDragonPunch, SkillEagleStrike, SkillTigerClaw, SkillRoundKick };
|
int MonkSPA [5] = { SkillFlyingKick, SkillDragonPunch, SkillEagleStrike, SkillTigerClaw, SkillRoundKick };
|
||||||
MonkSpecialAttack(GetTarget(), MonkSPA[MakeRandomInt(0,4)]);
|
MonkSpecialAttack(GetTarget(), MonkSPA[MakeRandomInt(0, 4)]);
|
||||||
|
|
||||||
int TripleChance = 25;
|
// always 1/4 of the double attack chance, 25% at rank 5 (100/4)
|
||||||
|
if ((bDoubleSpecialAttack / 4) > MakeRandomInt(0, 99))
|
||||||
if (bDoubleSpecialAttack > 100)
|
MonkSpecialAttack(GetTarget(), MonkSPA[MakeRandomInt(0, 4)]);
|
||||||
TripleChance += TripleChance*(100-bDoubleSpecialAttack)/100;
|
|
||||||
|
|
||||||
if(TripleChance > MakeRandomInt(0,100)) {
|
|
||||||
MonkSpecialAttack(GetTarget(), MonkSPA[MakeRandomInt(0,4)]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ReuseTime < 100) {
|
if(ReuseTime < 100) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user