mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-15 16:02:24 +00:00
Merge branch 'master' into inv2
This commit is contained in:
commit
ff3cb9fc54
@ -1,5 +1,9 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 03/29/2015 ==
|
||||||
|
Secrets: Identified the Target Ring fields for RoF/RoF2.
|
||||||
|
Secrets: Added a perl accessor for the last target ring position received from the client. Usage: $client->GetTargetRingX(), $client->GetTargetRingY(), $client->GetTargetRingZ()
|
||||||
|
|
||||||
== 03/12/2015 ==
|
== 03/12/2015 ==
|
||||||
Akkadius: [eqemu_update.pl V7] Add Option 9) LUA Modules - Download latest LUA Modules (Required for Lua)
|
Akkadius: [eqemu_update.pl V7] Add Option 9) LUA Modules - Download latest LUA Modules (Required for Lua)
|
||||||
|
|
||||||
|
|||||||
@ -1287,8 +1287,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 action;
|
/*02*/ uint8 speed;
|
||||||
/*03*/ uint8 value;
|
/*03*/ uint8 action;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -227,8 +227,8 @@ namespace RoF
|
|||||||
SETUP_DIRECT_ENCODE(Animation_Struct, structs::Animation_Struct);
|
SETUP_DIRECT_ENCODE(Animation_Struct, structs::Animation_Struct);
|
||||||
|
|
||||||
OUT(spawnid);
|
OUT(spawnid);
|
||||||
OUT(value);
|
|
||||||
OUT(action);
|
OUT(action);
|
||||||
|
OUT(speed);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@ -4119,6 +4119,18 @@ namespace RoF
|
|||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODE(OP_Animation)
|
||||||
|
{
|
||||||
|
DECODE_LENGTH_EXACT(structs::Animation_Struct);
|
||||||
|
SETUP_DIRECT_DECODE(Animation_Struct, structs::Animation_Struct);
|
||||||
|
|
||||||
|
IN(spawnid);
|
||||||
|
IN(action);
|
||||||
|
IN(speed);
|
||||||
|
|
||||||
|
FINISH_DIRECT_DECODE();
|
||||||
|
}
|
||||||
|
|
||||||
DECODE(OP_ApplyPoison)
|
DECODE(OP_ApplyPoison)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct);
|
DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct);
|
||||||
@ -4237,6 +4249,10 @@ namespace RoF
|
|||||||
//IN(inventoryslot);
|
//IN(inventoryslot);
|
||||||
IN(target_id);
|
IN(target_id);
|
||||||
|
|
||||||
|
IN(y_pos);
|
||||||
|
IN(x_pos);
|
||||||
|
IN(z_pos);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -295,8 +295,8 @@ namespace RoF2
|
|||||||
SETUP_DIRECT_ENCODE(Animation_Struct, structs::Animation_Struct);
|
SETUP_DIRECT_ENCODE(Animation_Struct, structs::Animation_Struct);
|
||||||
|
|
||||||
OUT(spawnid);
|
OUT(spawnid);
|
||||||
OUT(value);
|
|
||||||
OUT(action);
|
OUT(action);
|
||||||
|
OUT(speed);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@ -515,6 +515,11 @@ namespace RoF2
|
|||||||
{
|
{
|
||||||
buffslot += 17;
|
buffslot += 17;
|
||||||
}
|
}
|
||||||
|
// TODO: We should really just deal with these "server side"
|
||||||
|
// so we can have clients not limited to other clients.
|
||||||
|
// This fixes discs, songs were changed to 20
|
||||||
|
if (buffslot == 54)
|
||||||
|
buffslot = 62;
|
||||||
|
|
||||||
__packet->WriteUInt32(buffslot);
|
__packet->WriteUInt32(buffslot);
|
||||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||||
@ -4251,6 +4256,18 @@ namespace RoF2
|
|||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODE(OP_Animation)
|
||||||
|
{
|
||||||
|
DECODE_LENGTH_EXACT(structs::Animation_Struct);
|
||||||
|
SETUP_DIRECT_DECODE(Animation_Struct, structs::Animation_Struct);
|
||||||
|
|
||||||
|
IN(spawnid);
|
||||||
|
IN(action);
|
||||||
|
IN(speed);
|
||||||
|
|
||||||
|
FINISH_DIRECT_DECODE();
|
||||||
|
}
|
||||||
|
|
||||||
DECODE(OP_ApplyPoison)
|
DECODE(OP_ApplyPoison)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct);
|
DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct);
|
||||||
@ -4367,6 +4384,9 @@ namespace RoF2
|
|||||||
emu->inventoryslot = RoF2ToServerSlot(eq->inventoryslot);
|
emu->inventoryslot = RoF2ToServerSlot(eq->inventoryslot);
|
||||||
//IN(inventoryslot);
|
//IN(inventoryslot);
|
||||||
IN(target_id);
|
IN(target_id);
|
||||||
|
IN(y_pos);
|
||||||
|
IN(x_pos);
|
||||||
|
IN(z_pos);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -124,6 +124,7 @@ E(OP_ZoneSpawns)
|
|||||||
D(OP_AdventureMerchantSell)
|
D(OP_AdventureMerchantSell)
|
||||||
D(OP_AltCurrencySell)
|
D(OP_AltCurrencySell)
|
||||||
D(OP_AltCurrencySellSelection)
|
D(OP_AltCurrencySellSelection)
|
||||||
|
D(OP_Animation)
|
||||||
D(OP_ApplyPoison)
|
D(OP_ApplyPoison)
|
||||||
D(OP_AugmentInfo)
|
D(OP_AugmentInfo)
|
||||||
D(OP_AugmentItem)
|
D(OP_AugmentItem)
|
||||||
|
|||||||
@ -658,7 +658,10 @@ struct CastSpell_Struct
|
|||||||
/*04*/ uint32 spell_id;
|
/*04*/ uint32 spell_id;
|
||||||
/*08*/ ItemSlotStruct inventoryslot; // slot for clicky item, Seen unknown of 131 = normal cast
|
/*08*/ ItemSlotStruct inventoryslot; // slot for clicky item, Seen unknown of 131 = normal cast
|
||||||
/*20*/ uint32 target_id;
|
/*20*/ uint32 target_id;
|
||||||
/*24*/ uint32 cs_unknown[5];
|
/*24*/ uint32 cs_unknown[2];
|
||||||
|
/*32*/ float y_pos;
|
||||||
|
/*36*/ float x_pos;
|
||||||
|
/*40*/ float z_pos;
|
||||||
/*44*/
|
/*44*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1415,8 +1418,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 value;
|
/*02*/ uint8 action;
|
||||||
/*03*/ uint8 action;
|
/*03*/ uint8 speed;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -4186,9 +4189,11 @@ struct Arrow_Struct {
|
|||||||
/*068*/ uint8 unknown068;
|
/*068*/ uint8 unknown068;
|
||||||
/*069*/ uint8 unknown069;
|
/*069*/ uint8 unknown069;
|
||||||
/*070*/ uint8 unknown070;
|
/*070*/ uint8 unknown070;
|
||||||
/*071*/ uint8 item_type;
|
/*071*/ uint8 unknown071;
|
||||||
/*072*/ uint8 skill;
|
/*072*/ uint8 unknown072;
|
||||||
/*073*/ uint8 unknown073[16];
|
/*073*/ uint8 skill;
|
||||||
|
/*074*/ uint8 item_type;
|
||||||
|
/*075*/ uint8 unknown075[14];
|
||||||
/*089*/ char model_name[27];
|
/*089*/ char model_name[27];
|
||||||
/*116*/
|
/*116*/
|
||||||
};
|
};
|
||||||
|
|||||||
@ -109,6 +109,7 @@ E(OP_ZoneSpawns)
|
|||||||
D(OP_AdventureMerchantSell)
|
D(OP_AdventureMerchantSell)
|
||||||
D(OP_AltCurrencySell)
|
D(OP_AltCurrencySell)
|
||||||
D(OP_AltCurrencySellSelection)
|
D(OP_AltCurrencySellSelection)
|
||||||
|
D(OP_Animation)
|
||||||
D(OP_ApplyPoison)
|
D(OP_ApplyPoison)
|
||||||
D(OP_AugmentInfo)
|
D(OP_AugmentInfo)
|
||||||
D(OP_AugmentItem)
|
D(OP_AugmentItem)
|
||||||
|
|||||||
@ -647,7 +647,10 @@ struct CastSpell_Struct
|
|||||||
/*04*/ uint32 spell_id;
|
/*04*/ uint32 spell_id;
|
||||||
/*08*/ ItemSlotStruct inventoryslot; // slot for clicky item, Seen unknown of 131 = normal cast
|
/*08*/ ItemSlotStruct inventoryslot; // slot for clicky item, Seen unknown of 131 = normal cast
|
||||||
/*20*/ uint32 target_id;
|
/*20*/ uint32 target_id;
|
||||||
/*24*/ uint32 cs_unknown[5];
|
/*24*/ uint32 cs_unknown[2];
|
||||||
|
/*32*/ float y_pos;
|
||||||
|
/*36*/ float x_pos;
|
||||||
|
/*40*/ float z_pos;
|
||||||
/*44*/
|
/*44*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1445,8 +1448,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 value;
|
/*02*/ uint8 action;
|
||||||
/*03*/ uint8 action;
|
/*03*/ uint8 speed;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1205,8 +1205,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 action;
|
/*02*/ uint8 speed;
|
||||||
/*03*/ uint8 value;
|
/*03*/ uint8 action;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1182,8 +1182,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 action;
|
/*02*/ uint8 speed;
|
||||||
/*03*/ uint8 value;
|
/*03*/ uint8 action;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1062,8 +1062,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 action;
|
/*02*/ uint8 speed;
|
||||||
/*03*/ uint8 value;
|
/*03*/ uint8 action;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1260,8 +1260,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 action;
|
/*02*/ uint8 speed;
|
||||||
/*03*/ uint8 value;
|
/*03*/ uint8 action;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -103,6 +103,16 @@ RULE_INT ( Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's
|
|||||||
RULE_INT ( Character, OrnamentationAugmentType, 20) //Ornamentation Augment Type
|
RULE_INT ( Character, OrnamentationAugmentType, 20) //Ornamentation Augment Type
|
||||||
RULE_REAL(Character, EnvironmentDamageMulipliter, 1)
|
RULE_REAL(Character, EnvironmentDamageMulipliter, 1)
|
||||||
RULE_BOOL(Character, UnmemSpellsOnDeath, true)
|
RULE_BOOL(Character, UnmemSpellsOnDeath, true)
|
||||||
|
RULE_INT ( Character, TradeskillUpAlchemy, 2 ) // Alchemy skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpBaking, 2 ) // Baking skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpBlacksmithing, 2 ) // Blacksmithing skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpBrewing, 3 ) // Brewing skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpFletching, 2 ) // Fletching skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpJewelcrafting, 2 ) // Jewelcrafting skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpMakePoison, 2 ) // Make Poison skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpPottery, 4 ) // Pottery skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpResearch, 1 ) // Research skillup rate adjust. Lower is faster.
|
||||||
|
RULE_INT ( Character, TradeskillUpTinkering, 2 ) // Tinkering skillup rate adjust. Lower is faster.
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY( Mercs )
|
RULE_CATEGORY( Mercs )
|
||||||
|
|||||||
@ -1318,8 +1318,10 @@ bool ZoneServer::Process() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (pack)
|
||||||
delete pack;
|
delete pack;
|
||||||
|
else
|
||||||
|
Log.Out(Logs::Detail, Logs::World_Server, "Zoneserver process tried to delete pack when pack does not exist.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4108,6 +4108,14 @@ void Mob::TrySpellProc(const ItemInst *inst, const ItemData *weapon, Mob *on, ui
|
|||||||
Log.Out(Logs::Detail, Logs::Combat,
|
Log.Out(Logs::Detail, Logs::Combat,
|
||||||
"Spell proc %d procing spell %d (%.2f percent chance)",
|
"Spell proc %d procing spell %d (%.2f percent chance)",
|
||||||
i, SpellProcs[i].spellID, chance);
|
i, SpellProcs[i].spellID, chance);
|
||||||
|
auto outapp = new EQApplicationPacket(OP_BeginCast,sizeof(BeginCast_Struct));
|
||||||
|
BeginCast_Struct* begincast = (BeginCast_Struct*)outapp->pBuffer;
|
||||||
|
begincast->caster_id = GetID();
|
||||||
|
begincast->spell_id = SpellProcs[i].spellID;
|
||||||
|
begincast->cast_time = 0;
|
||||||
|
outapp->priority = 3;
|
||||||
|
entity_list.QueueCloseClients(this, outapp, false, 200, 0, true);
|
||||||
|
safe_delete(outapp);
|
||||||
ExecWeaponProc(nullptr, SpellProcs[i].spellID, on);
|
ExecWeaponProc(nullptr, SpellProcs[i].spellID, on);
|
||||||
CheckNumHitsRemaining(NumHit::OffensiveSpellProcs, 0,
|
CheckNumHitsRemaining(NumHit::OffensiveSpellProcs, 0,
|
||||||
SpellProcs[i].base_spellID);
|
SpellProcs[i].base_spellID);
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Beacon::Beacon(Mob *at_mob, int lifetime)
|
|||||||
:Mob
|
:Mob
|
||||||
(
|
(
|
||||||
nullptr, nullptr, 0, 0, 0, INVISIBLE_MAN, 0, BT_NoTarget, 0, 0, 0, 0, 0, at_mob->GetPosition(), 0, 0, 0,
|
nullptr, nullptr, 0, 0, 0, INVISIBLE_MAN, 0, BT_NoTarget, 0, 0, 0, 0, 0, at_mob->GetPosition(), 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
),
|
),
|
||||||
remove_timer(lifetime),
|
remove_timer(lifetime),
|
||||||
spell_timer(0)
|
spell_timer(0)
|
||||||
|
|||||||
@ -107,8 +107,12 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
0,
|
0,
|
||||||
0, // qglobal
|
0, // qglobal
|
||||||
0, // maxlevel
|
0, // maxlevel
|
||||||
0 // scalerate
|
0, // scalerate
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
),
|
),
|
||||||
//these must be listed in the order they appear in client.h
|
//these must be listed in the order they appear in client.h
|
||||||
position_timer(250),
|
position_timer(250),
|
||||||
@ -7763,7 +7767,8 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
|
|||||||
if (primaryfaction > 0) {
|
if (primaryfaction > 0) {
|
||||||
if (database.GetFactionData(&fmod, GetClass(), GetRace(), GetDeity(), primaryfaction)) {
|
if (database.GetFactionData(&fmod, GetClass(), GetRace(), GetDeity(), primaryfaction)) {
|
||||||
tmpFactionValue = GetCharacterFactionLevel(primaryfaction);
|
tmpFactionValue = GetCharacterFactionLevel(primaryfaction);
|
||||||
lowestvalue = std::min(tmpFactionValue, std::min(fmod.class_mod, fmod.race_mod));
|
lowestvalue = std::min(std::min(tmpFactionValue, fmod.deity_mod),
|
||||||
|
std::min(fmod.class_mod, fmod.race_mod));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If no primary faction or biggest influence is your faction hit
|
// If no primary faction or biggest influence is your faction hit
|
||||||
@ -7811,6 +7816,11 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
|
|||||||
}
|
}
|
||||||
} else if (lowestvalue == fmod.class_mod) {
|
} else if (lowestvalue == fmod.class_mod) {
|
||||||
merchant->Say_StringID(zone->random.Int(WONT_SELL_CLASS1, WONT_SELL_CLASS5), itoa(GetClass()));
|
merchant->Say_StringID(zone->random.Int(WONT_SELL_CLASS1, WONT_SELL_CLASS5), itoa(GetClass()));
|
||||||
|
} else {
|
||||||
|
// Must be deity - these two sound the best for that.
|
||||||
|
// Can't use a message with a field, GUI wants class/race names.
|
||||||
|
// for those message IDs. These are straight text.
|
||||||
|
merchant->Say_StringID(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS2));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2607,7 +2607,7 @@ void Client::Handle_OP_AltCurrencyReclaim(const EQApplicationPacket *app)
|
|||||||
++iter;
|
++iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item_id == 0 || reclaim->count == 0) {
|
if (item_id == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2628,6 +2628,9 @@ void Client::Handle_OP_AltCurrencyReclaim(const EQApplicationPacket *app)
|
|||||||
else {
|
else {
|
||||||
uint32 max_currency = GetAlternateCurrencyValue(reclaim->currency_id);
|
uint32 max_currency = GetAlternateCurrencyValue(reclaim->currency_id);
|
||||||
|
|
||||||
|
if(max_currency == 0 || reclaim->count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
/* If you input more than you have currency wise, just give the max of the currency you currently have */
|
/* If you input more than you have currency wise, just give the max of the currency you currently have */
|
||||||
if (reclaim->count > max_currency) {
|
if (reclaim->count > max_currency) {
|
||||||
SummonItem(item_id, max_currency, 0);
|
SummonItem(item_id, max_currency, 0);
|
||||||
@ -2831,8 +2834,7 @@ void Client::Handle_OP_Animation(const EQApplicationPacket *app)
|
|||||||
Animation_Struct *s = (Animation_Struct *)app->pBuffer;
|
Animation_Struct *s = (Animation_Struct *)app->pBuffer;
|
||||||
|
|
||||||
//might verify spawn ID, but it wouldent affect anything
|
//might verify spawn ID, but it wouldent affect anything
|
||||||
|
DoAnim(s->action, s->speed);
|
||||||
DoAnim(s->action, s->value);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -152,7 +152,7 @@ Corpse::Corpse(NPC* in_npc, ItemList* in_itemlist, uint32 in_npctypeid, const NP
|
|||||||
in_npc->GetDeity(),in_npc->GetLevel(),in_npc->GetNPCTypeID(),in_npc->GetSize(),0,
|
in_npc->GetDeity(),in_npc->GetLevel(),in_npc->GetNPCTypeID(),in_npc->GetSize(),0,
|
||||||
in_npc->GetPosition(), in_npc->GetInnateLightType(), in_npc->GetTexture(),in_npc->GetHelmTexture(),
|
in_npc->GetPosition(), in_npc->GetInnateLightType(), in_npc->GetTexture(),in_npc->GetHelmTexture(),
|
||||||
0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0xff,0,0,0,0,0,0,0,0,0),
|
0,0,0,0,0,0,0,0,0,0,0,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
|
||||||
corpse_decay_timer(in_decaytime),
|
corpse_decay_timer(in_decaytime),
|
||||||
corpse_rez_timer(0),
|
corpse_rez_timer(0),
|
||||||
corpse_delay_timer(RuleI(NPC, CorpseUnlockTimer)),
|
corpse_delay_timer(RuleI(NPC, CorpseUnlockTimer)),
|
||||||
@ -253,7 +253,12 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
|||||||
0, // int32 in_mana_regen,
|
0, // int32 in_mana_regen,
|
||||||
0, // uint8 in_qglobal,
|
0, // uint8 in_qglobal,
|
||||||
0, // uint8 in_maxlevel,
|
0, // uint8 in_maxlevel,
|
||||||
0 // uint32 in_scalerate
|
0, // uint32 in_scalerate
|
||||||
|
0, // uint8 in_armtexture,
|
||||||
|
0, // uint8 in_bracertexture,
|
||||||
|
0, // uint8 in_handtexture,
|
||||||
|
0, // uint8 in_legtexture,
|
||||||
|
0 // uint8 in_feettexture,
|
||||||
),
|
),
|
||||||
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
||||||
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
||||||
@ -478,6 +483,11 @@ in_helmtexture,
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
0),
|
0),
|
||||||
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
||||||
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
||||||
|
|||||||
@ -137,6 +137,7 @@ void ZoneDatabase::AddLootDropToNPC(NPC* npc,uint32 lootdrop_id, ItemList* iteml
|
|||||||
}
|
}
|
||||||
|
|
||||||
float roll_t = 0.0f;
|
float roll_t = 0.0f;
|
||||||
|
float roll_t_min = 0.0f;
|
||||||
bool active_item_list = false;
|
bool active_item_list = false;
|
||||||
for(uint32 i = 0; i < lds->NumEntries; ++i) {
|
for(uint32 i = 0; i < lds->NumEntries; ++i) {
|
||||||
const ItemData* db_item = GetItem(lds->Entries[i].item_id);
|
const ItemData* db_item = GetItem(lds->Entries[i].item_id);
|
||||||
@ -146,15 +147,44 @@ void ZoneDatabase::AddLootDropToNPC(NPC* npc,uint32 lootdrop_id, ItemList* iteml
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
roll_t_min = roll_t;
|
||||||
roll_t = EQEmu::ClampLower(roll_t, 100.0f);
|
roll_t = EQEmu::ClampLower(roll_t, 100.0f);
|
||||||
|
|
||||||
if(!active_item_list) {
|
if(!active_item_list) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mindrop = EQEmu::ClampLower(mindrop, (uint8)1);
|
for(int i = 0; i < mindrop; ++i) {
|
||||||
int item_count = zone->random.Int(mindrop, droplimit);
|
float roll = (float)zone->random.Real(0.0, roll_t_min);
|
||||||
for(int i = 0; i < item_count; ++i) {
|
for(uint32 j = 0; j < lds->NumEntries; ++j) {
|
||||||
|
const Item_Struct* db_item = GetItem(lds->Entries[j].item_id);
|
||||||
|
if(db_item) {
|
||||||
|
if(roll < lds->Entries[j].chance) {
|
||||||
|
npc->AddLootDrop(db_item, itemlist, lds->Entries[j].item_charges, lds->Entries[j].minlevel,
|
||||||
|
lds->Entries[j].maxlevel, lds->Entries[j].equip_item > 0 ? true : false, false);
|
||||||
|
|
||||||
|
int charges = (int)lds->Entries[i].multiplier;
|
||||||
|
charges = EQEmu::ClampLower(charges, 1);
|
||||||
|
|
||||||
|
for(int k = 1; k < charges; ++k) {
|
||||||
|
float c_roll = (float)zone->random.Real(0.0, 100.0);
|
||||||
|
if(c_roll <= lds->Entries[i].chance) {
|
||||||
|
npc->AddLootDrop(db_item, itemlist, lds->Entries[j].item_charges, lds->Entries[j].minlevel,
|
||||||
|
lds->Entries[j].maxlevel, lds->Entries[j].equip_item > 0 ? true : false, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
j = lds->NumEntries;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
roll -= lds->Entries[j].chance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = mindrop; i < droplimit; ++i) {
|
||||||
float roll = (float)zone->random.Real(0.0, roll_t);
|
float roll = (float)zone->random.Real(0.0, roll_t);
|
||||||
for(uint32 j = 0; j < lds->NumEntries; ++j) {
|
for(uint32 j = 0; j < lds->NumEntries; ++j) {
|
||||||
const ItemData* db_item = GetItem(lds->Entries[j].item_id);
|
const ItemData* db_item = GetItem(lds->Entries[j].item_id);
|
||||||
|
|||||||
22
zone/mob.cpp
22
zone/mob.cpp
@ -83,7 +83,12 @@ Mob::Mob(const char* in_name,
|
|||||||
int32 in_mana_regen,
|
int32 in_mana_regen,
|
||||||
uint8 in_qglobal,
|
uint8 in_qglobal,
|
||||||
uint8 in_maxlevel,
|
uint8 in_maxlevel,
|
||||||
uint32 in_scalerate
|
uint32 in_scalerate,
|
||||||
|
uint8 in_armtexture,
|
||||||
|
uint8 in_bracertexture,
|
||||||
|
uint8 in_handtexture,
|
||||||
|
uint8 in_legtexture,
|
||||||
|
uint8 in_feettexture
|
||||||
) :
|
) :
|
||||||
attack_timer(2000),
|
attack_timer(2000),
|
||||||
attack_dw_timer(2000),
|
attack_dw_timer(2000),
|
||||||
@ -159,6 +164,13 @@ Mob::Mob(const char* in_name,
|
|||||||
|
|
||||||
texture = in_texture;
|
texture = in_texture;
|
||||||
helmtexture = in_helmtexture;
|
helmtexture = in_helmtexture;
|
||||||
|
armtexture = in_armtexture;
|
||||||
|
bracertexture = in_bracertexture;
|
||||||
|
handtexture = in_handtexture;
|
||||||
|
legtexture = in_legtexture;
|
||||||
|
feettexture = in_feettexture;
|
||||||
|
multitexture = (armtexture || bracertexture || handtexture || legtexture || feettexture);
|
||||||
|
|
||||||
haircolor = in_haircolor;
|
haircolor = in_haircolor;
|
||||||
beardcolor = in_beardcolor;
|
beardcolor = in_beardcolor;
|
||||||
eyecolor1 = in_eyecolor1;
|
eyecolor1 = in_eyecolor1;
|
||||||
@ -931,7 +943,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
|||||||
ns->spawn.drakkin_heritage = drakkin_heritage;
|
ns->spawn.drakkin_heritage = drakkin_heritage;
|
||||||
ns->spawn.drakkin_tattoo = drakkin_tattoo;
|
ns->spawn.drakkin_tattoo = drakkin_tattoo;
|
||||||
ns->spawn.drakkin_details = drakkin_details;
|
ns->spawn.drakkin_details = drakkin_details;
|
||||||
ns->spawn.equip_chest2 = GetHerosForgeModel(1) != 0 ? 0xff : texture;
|
ns->spawn.equip_chest2 = GetHerosForgeModel(1) != 0 || multitexture? 0xff : texture;
|
||||||
|
|
||||||
// ns->spawn.invis2 = 0xff;//this used to be labeled beard.. if its not FF it will turn mob invis
|
// ns->spawn.invis2 = 0xff;//this used to be labeled beard.. if its not FF it will turn mob invis
|
||||||
|
|
||||||
@ -1303,12 +1315,12 @@ void Mob::DoAnim(const int animnum, int type, bool ackreq, eqFilterType filter)
|
|||||||
Animation_Struct* anim = (Animation_Struct*)outapp->pBuffer;
|
Animation_Struct* anim = (Animation_Struct*)outapp->pBuffer;
|
||||||
anim->spawnid = GetID();
|
anim->spawnid = GetID();
|
||||||
if(type == 0){
|
if(type == 0){
|
||||||
anim->action = 10;
|
anim->action = animnum;
|
||||||
anim->value=animnum;
|
anim->speed = 10;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
anim->action = animnum;
|
anim->action = animnum;
|
||||||
anim->value=type;
|
anim->speed = type;
|
||||||
}
|
}
|
||||||
entity_list.QueueCloseClients(this, outapp, false, 200, 0, ackreq, filter);
|
entity_list.QueueCloseClients(this, outapp, false, 200, 0, ackreq, filter);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
|
|||||||
13
zone/mob.h
13
zone/mob.h
@ -113,7 +113,12 @@ public:
|
|||||||
int32 in_mana_regen,
|
int32 in_mana_regen,
|
||||||
uint8 in_qglobal,
|
uint8 in_qglobal,
|
||||||
uint8 in_maxlevel,
|
uint8 in_maxlevel,
|
||||||
uint32 in_scalerate
|
uint32 in_scalerate,
|
||||||
|
uint8 in_armtexture,
|
||||||
|
uint8 in_bracertexture,
|
||||||
|
uint8 in_handtexture,
|
||||||
|
uint8 in_legtexture,
|
||||||
|
uint8 in_feettexture
|
||||||
);
|
);
|
||||||
virtual ~Mob();
|
virtual ~Mob();
|
||||||
|
|
||||||
@ -975,6 +980,12 @@ protected:
|
|||||||
uint16 entity_id_being_looted; //the id of the entity being looted, 0 if not looting.
|
uint16 entity_id_being_looted; //the id of the entity being looted, 0 if not looting.
|
||||||
uint8 texture;
|
uint8 texture;
|
||||||
uint8 helmtexture;
|
uint8 helmtexture;
|
||||||
|
uint8 armtexture;
|
||||||
|
uint8 bracertexture;
|
||||||
|
uint8 handtexture;
|
||||||
|
uint8 legtexture;
|
||||||
|
uint8 feettexture;
|
||||||
|
bool multitexture;
|
||||||
|
|
||||||
int AC;
|
int AC;
|
||||||
int32 ATK;
|
int32 ATK;
|
||||||
|
|||||||
17
zone/npc.cpp
17
zone/npc.cpp
@ -103,7 +103,12 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if
|
|||||||
d->mana_regen,
|
d->mana_regen,
|
||||||
d->qglobal,
|
d->qglobal,
|
||||||
d->maxlevel,
|
d->maxlevel,
|
||||||
d->scalerate ),
|
d->scalerate,
|
||||||
|
d->armtexture,
|
||||||
|
d->bracertexture,
|
||||||
|
d->handtexture,
|
||||||
|
d->legtexture,
|
||||||
|
d->feettexture),
|
||||||
attacked_timer(CombatEventTimer_expire),
|
attacked_timer(CombatEventTimer_expire),
|
||||||
swarm_timer(100),
|
swarm_timer(100),
|
||||||
classattack_timer(1000),
|
classattack_timer(1000),
|
||||||
@ -1308,6 +1313,16 @@ int32 NPC::GetEquipmentMaterial(uint8 material_slot) const
|
|||||||
return helmtexture;
|
return helmtexture;
|
||||||
case MaterialChest:
|
case MaterialChest:
|
||||||
return texture;
|
return texture;
|
||||||
|
case MaterialArms:
|
||||||
|
return armtexture;
|
||||||
|
case MaterialWrist:
|
||||||
|
return bracertexture;
|
||||||
|
case MaterialHands:
|
||||||
|
return handtexture;
|
||||||
|
case MaterialLegs:
|
||||||
|
return legtexture;
|
||||||
|
case MaterialFeet:
|
||||||
|
return feettexture;
|
||||||
case MaterialPrimary:
|
case MaterialPrimary:
|
||||||
return d_melee_texture1;
|
return d_melee_texture1;
|
||||||
case MaterialSecondary:
|
case MaterialSecondary:
|
||||||
|
|||||||
@ -6110,6 +6110,84 @@ XS(XS_Client_SendSpellAnim)
|
|||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XS(XS_Client_GetTargetRingX); /* prototype to pass -Wmissing-prototypes */
|
||||||
|
XS(XS_Client_GetTargetRingX)
|
||||||
|
{
|
||||||
|
dXSARGS;
|
||||||
|
if (items != 1)
|
||||||
|
Perl_croak(aTHX_ "Usage: Client::GetTargetRingX(THIS)");
|
||||||
|
{
|
||||||
|
Client * THIS;
|
||||||
|
float RETVAL;
|
||||||
|
dXSTARG;
|
||||||
|
|
||||||
|
if (sv_derived_from(ST(0), "Client")) {
|
||||||
|
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||||
|
THIS = INT2PTR(Client *,tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||||
|
if(THIS == nullptr)
|
||||||
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
|
RETVAL = THIS->GetTargetRingX();
|
||||||
|
XSprePUSH; PUSHn((double)RETVAL);
|
||||||
|
}
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS_Client_GetTargetRingY); /* prototype to pass -Wmissing-prototypes */
|
||||||
|
XS(XS_Client_GetTargetRingY)
|
||||||
|
{
|
||||||
|
dXSARGS;
|
||||||
|
if (items != 1)
|
||||||
|
Perl_croak(aTHX_ "Usage: Client::GetTargetRingY(THIS)");
|
||||||
|
{
|
||||||
|
Client * THIS;
|
||||||
|
float RETVAL;
|
||||||
|
dXSTARG;
|
||||||
|
|
||||||
|
if (sv_derived_from(ST(0), "Client")) {
|
||||||
|
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||||
|
THIS = INT2PTR(Client *,tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||||
|
if(THIS == nullptr)
|
||||||
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
|
RETVAL = THIS->GetTargetRingY();
|
||||||
|
XSprePUSH; PUSHn((double)RETVAL);
|
||||||
|
}
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS_Client_GetTargetRingZ); /* prototype to pass -Wmissing-prototypes */
|
||||||
|
XS(XS_Client_GetTargetRingZ)
|
||||||
|
{
|
||||||
|
dXSARGS;
|
||||||
|
if (items != 1)
|
||||||
|
Perl_croak(aTHX_ "Usage: Client::GetTargetRingZ(THIS)");
|
||||||
|
{
|
||||||
|
Client * THIS;
|
||||||
|
float RETVAL;
|
||||||
|
dXSTARG;
|
||||||
|
|
||||||
|
if (sv_derived_from(ST(0), "Client")) {
|
||||||
|
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||||
|
THIS = INT2PTR(Client *,tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||||
|
if(THIS == nullptr)
|
||||||
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
|
RETVAL = THIS->GetTargetRingZ();
|
||||||
|
XSprePUSH; PUSHn((double)RETVAL);
|
||||||
|
}
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
@ -6351,6 +6429,9 @@ XS(boot_Client)
|
|||||||
newXSproto(strcpy(buf, "SendMarqueeMessage"), XS_Client_SendMarqueeMessage, file, "$$$$$$$");
|
newXSproto(strcpy(buf, "SendMarqueeMessage"), XS_Client_SendMarqueeMessage, file, "$$$$$$$");
|
||||||
newXSproto(strcpy(buf, "SendColoredText"), XS_Client_SendColoredText, file, "$$$");
|
newXSproto(strcpy(buf, "SendColoredText"), XS_Client_SendColoredText, file, "$$$");
|
||||||
newXSproto(strcpy(buf, "SendSpellAnim"), XS_Client_SendSpellAnim, file, "$$$");
|
newXSproto(strcpy(buf, "SendSpellAnim"), XS_Client_SendSpellAnim, file, "$$$");
|
||||||
|
newXSproto(strcpy(buf, "GetTargetRingX"), XS_Client_GetTargetRingX, file, "$$");
|
||||||
|
newXSproto(strcpy(buf, "GetTargetRingY"), XS_Client_GetTargetRingY, file, "$$");
|
||||||
|
newXSproto(strcpy(buf, "GetTargetRingZ"), XS_Client_GetTargetRingZ, file, "$$");
|
||||||
|
|
||||||
XSRETURN_YES;
|
XSRETURN_YES;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5253,7 +5253,7 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
|
|||||||
|
|
||||||
if (IsValidSpell(proc_spellid)){
|
if (IsValidSpell(proc_spellid)){
|
||||||
|
|
||||||
ProcChance = GetSympatheticProcChances(spell_id, GetSympatheticSpellProcRate(spell_id));
|
ProcChance = GetSympatheticProcChances(spell_id, GetSympatheticSpellProcRate(proc_spellid));
|
||||||
if(zone->random.Roll(ProcChance))
|
if(zone->random.Roll(ProcChance))
|
||||||
SympatheticProcList.push_back(proc_spellid);
|
SympatheticProcList.push_back(proc_spellid);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2672,7 +2672,7 @@ int CalcBuffDuration_formula(int level, int formula, int duration)
|
|||||||
return i < duration ? (i < 1 ? 1 : i) : duration;
|
return i < duration ? (i < 1 ? 1 : i) : duration;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
return duration;
|
return std::min((level + 3) * 30, duration);
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
return duration;
|
return duration;
|
||||||
@ -5254,7 +5254,7 @@ void Client::SendBuffDurationPacket(Buffs_Struct &buff)
|
|||||||
sbf->slot = 2;
|
sbf->slot = 2;
|
||||||
sbf->spellid = buff.spellid;
|
sbf->spellid = buff.spellid;
|
||||||
sbf->slotid = 0;
|
sbf->slotid = 0;
|
||||||
sbf->effect = buff.casterlevel > 0 ? buff.casterlevel : GetLevel();
|
sbf->effect = 255;
|
||||||
sbf->level = buff.casterlevel > 0 ? buff.casterlevel : GetLevel();
|
sbf->level = buff.casterlevel > 0 ? buff.casterlevel : GetLevel();
|
||||||
sbf->bufffade = 0;
|
sbf->bufffade = 0;
|
||||||
sbf->duration = buff.ticsremaining;
|
sbf->duration = buff.ticsremaining;
|
||||||
|
|||||||
@ -848,24 +848,41 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
|||||||
// Some tradeskills are more eqal then others. ;-)
|
// Some tradeskills are more eqal then others. ;-)
|
||||||
// If you want to customize the stage1 success rate do it here.
|
// If you want to customize the stage1 success rate do it here.
|
||||||
// Remember: skillup_modifier is (float). Lower is better
|
// Remember: skillup_modifier is (float). Lower is better
|
||||||
switch(spec->tradeskill) {
|
switch(spec->tradeskill) {
|
||||||
case SkillFletching:
|
case SkillFletching:
|
||||||
case SkillAlchemy:
|
skillup_modifier = RuleI(Character, TradeskillUpFletching);
|
||||||
case SkillJewelryMaking:
|
break;
|
||||||
case SkillPottery:
|
case SkillAlchemy:
|
||||||
skillup_modifier = 4;
|
skillup_modifier = RuleI(Character, TradeskillUpAlchemy);
|
||||||
break;
|
break;
|
||||||
case SkillBaking:
|
case SkillJewelryMaking:
|
||||||
case SkillBrewing:
|
skillup_modifier = RuleI(Character, TradeskillUpJewelcrafting);
|
||||||
skillup_modifier = 3;
|
break;
|
||||||
break;
|
case SkillPottery:
|
||||||
case SkillResearch:
|
skillup_modifier = RuleI(Character, TradeskillUpPottery);
|
||||||
skillup_modifier = 1;
|
break;
|
||||||
break;
|
case SkillBaking:
|
||||||
default:
|
skillup_modifier = RuleI(Character, TradeskillUpBaking);
|
||||||
skillup_modifier = 2;
|
break;
|
||||||
break;
|
case SkillBrewing:
|
||||||
}
|
skillup_modifier = RuleI(Character, TradeskillUpBrewing);
|
||||||
|
break;
|
||||||
|
case SkillBlacksmithing:
|
||||||
|
skillup_modifier = RuleI(Character, TradeskillUpBlacksmithing);
|
||||||
|
break;
|
||||||
|
case SkillResearch:
|
||||||
|
skillup_modifier = RuleI(Character, TradeskillUpResearch);
|
||||||
|
break;
|
||||||
|
case SkillMakePoison:
|
||||||
|
skillup_modifier = RuleI(Character, TradeskillUpMakePoison);
|
||||||
|
break;
|
||||||
|
case SkillTinkering:
|
||||||
|
skillup_modifier = RuleI(Character, TradeskillUpTinkering);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
skillup_modifier = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Some tradeskills take the higher of one additional stat beside INT and WIS
|
// Some tradeskills take the higher of one additional stat beside INT and WIS
|
||||||
// to determine the skillup rate. Additionally these tradeskills do not have an
|
// to determine the skillup rate. Additionally these tradeskills do not have an
|
||||||
|
|||||||
@ -1626,23 +1626,10 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs, Client* Trader, const EQApplic
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnTraderReq(app, outtbs->Quantity, ItemID);
|
|
||||||
|
|
||||||
outtbs->TraderID = this->GetID();
|
|
||||||
outtbs->Action = BazaarBuyItem;
|
|
||||||
strn0cpy(outtbs->ItemName, BuyItem->GetItem()->Name, 64);
|
|
||||||
|
|
||||||
int TraderSlot = 0;
|
|
||||||
|
|
||||||
if(BuyItem->IsStackable())
|
|
||||||
SendTraderItem(BuyItem->GetItem()->ID, outtbs->Quantity);
|
|
||||||
else
|
|
||||||
SendTraderItem(BuyItem->GetItem()->ID, BuyItem->GetCharges());
|
|
||||||
|
|
||||||
// This cannot overflow assuming MAX_TRANSACTION_VALUE, checked above, is the default of 2000000000
|
// This cannot overflow assuming MAX_TRANSACTION_VALUE, checked above, is the default of 2000000000
|
||||||
uint32 TotalCost = tbs->Price * outtbs->Quantity;
|
uint32 TotalCost = tbs->Price * outtbs->Quantity;
|
||||||
|
|
||||||
if (Trader->GetClientVersion() >= ClientVersion::RoF)
|
if(Trader->GetClientVersion() >= ClientVersion::RoF)
|
||||||
{
|
{
|
||||||
// RoF+ uses individual item price where older clients use total price
|
// RoF+ uses individual item price where older clients use total price
|
||||||
outtbs->Price = tbs->Price;
|
outtbs->Price = tbs->Price;
|
||||||
@ -1673,6 +1660,19 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs, Client* Trader, const EQApplic
|
|||||||
|
|
||||||
Log.Out(Logs::Detail, Logs::Trading, "Trader Received: %d Platinum, %d Gold, %d Silver, %d Copper", platinum, gold, silver, copper);
|
Log.Out(Logs::Detail, Logs::Trading, "Trader Received: %d Platinum, %d Gold, %d Silver, %d Copper", platinum, gold, silver, copper);
|
||||||
|
|
||||||
|
ReturnTraderReq(app, outtbs->Quantity, ItemID);
|
||||||
|
|
||||||
|
outtbs->TraderID = this->GetID();
|
||||||
|
outtbs->Action = BazaarBuyItem;
|
||||||
|
strn0cpy(outtbs->ItemName, BuyItem->GetItem()->Name, 64);
|
||||||
|
|
||||||
|
int TraderSlot = 0;
|
||||||
|
|
||||||
|
if(BuyItem->IsStackable())
|
||||||
|
SendTraderItem(BuyItem->GetItem()->ID, outtbs->Quantity);
|
||||||
|
else
|
||||||
|
SendTraderItem(BuyItem->GetItem()->ID, BuyItem->GetCharges());
|
||||||
|
|
||||||
TraderSlot = Trader->FindTraderItem(tbs->ItemID, outtbs->Quantity);
|
TraderSlot = Trader->FindTraderItem(tbs->ItemID, outtbs->Quantity);
|
||||||
|
|
||||||
if(RuleB(Bazaar, AuditTrail))
|
if(RuleB(Bazaar, AuditTrail))
|
||||||
|
|||||||
@ -1905,7 +1905,12 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
|||||||
"npc_types.no_target_hotkey, "
|
"npc_types.no_target_hotkey, "
|
||||||
"npc_types.raid_target, "
|
"npc_types.raid_target, "
|
||||||
"npc_types.attack_delay, "
|
"npc_types.attack_delay, "
|
||||||
"npc_types.light "
|
"npc_types.light, "
|
||||||
|
"npc_types.armtexture, "
|
||||||
|
"npc_types.bracertexture, "
|
||||||
|
"npc_types.handtexture, "
|
||||||
|
"npc_types.legtexture, "
|
||||||
|
"npc_types.feettexture "
|
||||||
"FROM npc_types %s",
|
"FROM npc_types %s",
|
||||||
where_condition.c_str()
|
where_condition.c_str()
|
||||||
);
|
);
|
||||||
@ -2075,6 +2080,12 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
|||||||
temp_npctype_data->attack_delay = atoi(row[90]);
|
temp_npctype_data->attack_delay = atoi(row[90]);
|
||||||
temp_npctype_data->light = (atoi(row[91]) & 0x0F);
|
temp_npctype_data->light = (atoi(row[91]) & 0x0F);
|
||||||
|
|
||||||
|
temp_npctype_data->armtexture = atoi(row[92]);
|
||||||
|
temp_npctype_data->bracertexture = atoi(row[93]);
|
||||||
|
temp_npctype_data->handtexture = atoi(row[94]);
|
||||||
|
temp_npctype_data->legtexture = atoi(row[95]);
|
||||||
|
temp_npctype_data->feettexture = atoi(row[96]);
|
||||||
|
|
||||||
// If NPC with duplicate NPC id already in table,
|
// If NPC with duplicate NPC id already in table,
|
||||||
// free item we attempted to add.
|
// free item we attempted to add.
|
||||||
if (zone->npctable.find(temp_npctype_data->npc_id) != zone->npctable.end()) {
|
if (zone->npctable.find(temp_npctype_data->npc_id) != zone->npctable.end()) {
|
||||||
|
|||||||
@ -127,6 +127,11 @@ struct NPCType
|
|||||||
bool no_target_hotkey;
|
bool no_target_hotkey;
|
||||||
bool raid_target;
|
bool raid_target;
|
||||||
uint8 probability;
|
uint8 probability;
|
||||||
|
uint8 armtexture;
|
||||||
|
uint8 bracertexture;
|
||||||
|
uint8 handtexture;
|
||||||
|
uint8 legtexture;
|
||||||
|
uint8 feettexture;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace player_lootitem {
|
namespace player_lootitem {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user