Compare commits

...

16 Commits

Author SHA1 Message Date
Chris Miles df1d740ae6 [Release] 22.26.0 (#3596) 2023-09-17 15:14:01 -05:00
Alex King d7e810232a [Bug Fix] Fix entity ID on death with #castspell (#3592)
# Notes
- Entities killed by a spell with #cast were not reporting their pre-death entity ID properly.
- Added an `entity_id_override` to `GetTargetDescription()` and added a pre-defined entity ID variable to the cast command so we can message the proper pre-death entity ID.
2023-09-17 13:40:31 -05:00
Alex King 9b992167f0 [Bug Fix] Fix Killed XYZH support in EVENT_DEATH in Perl. (#3591)
* [Bug Fix] Fix Killer XYZH support in EVENT_DEATH in Perl.

# Notes
- Fixes XYZH exports in Perl.

* Update embparser.cpp
2023-09-17 13:40:07 -05:00
Clayton Dunwell 65d4533568 [Bug Fix] Check for Song Skill Increase on Bard Pulse (#3586)
* check for song skill increase on bard pulse

* style changes

* fix spacing
2023-09-17 13:29:48 -05:00
Clayton Dunwell eb545a18a4 [Feature] Cleanup Group Split Money Logic (#3583)
* addresses #2498

* fix some logic #2498

* fixes #2498

* derpy derp derp #2498

* leave default argument to appease build

* Formatting

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-09-17 13:22:26 -05:00
Alex King f2f0228aa4 [Quest API] Add XYZ/XYZH Overloads to Cross Zone Move Methods (#3581)
# Perl
- Add `quest::crosszonemoveplayerbycharid(character_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveplayerbycharid(character_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveplayerbygroupid(group_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveplayerbygroupid(group_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveplayerbyraidid(raid_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveplayerbyraidid(raid_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveplayerbyguildid(guild_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveplayerbyguildid(guild_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveplayerbyexpeditionid(expedition_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveplayerbyexpeditionid(expedition_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveplayerbyclientname(client_name, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveplayerbyclientname(client_name, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveinstancebycharid(character_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveinstancebycharid(character_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveinstancebygroupid(group_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveinstancebygroupid(group_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveinstancebyraidid(raid_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveinstancebyraidid(raid_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveinstancebyguildid(guild_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveinstancebyguildid(guild_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveinstancebyexpeditionid(expedition_id, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveinstancebyexpeditionid(expedition_id, zone_short_name, x, y, z, heading)`.
- Add `quest::crosszonemoveinstancebyclientname(client_name, zone_short_name, x, y, z)`.
- Add `quest::crosszonemoveinstancebyclientname(client_name, zone_short_name, x, y, z, heading)`.

# Lua
- Add `eq.cross_zone_move_player_by_char_id(character_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_player_by_char_id(character_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_player_by_group_id(group_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_player_by_group_id(group_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_player_by_raid_id(raid_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_player_by_raid_id(raid_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_player_by_guild_id(guild_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_player_by_guild_id(guild_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_player_by_expedition_id(expedition_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_player_by_expedition_id(expedition_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_player_by_client_name(client_name, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_player_by_client_name(client_name, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_instance_by_char_id(character_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_instance_by_char_id(character_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_instance_by_group_id(group_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_instance_by_group_id(group_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_instance_by_raid_id(raid_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_instance_by_raid_id(raid_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_instance_by_guild_id(guild_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_instance_by_guild_id(guild_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_instance_by_expedition_id(expedition_id, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_instance_by_expedition_id(expedition_id, zone_short_name, x, y, z, heading)`.
- Add `eq.cross_zone_move_instance_by_client_name(client_name, zone_short_name, x, y, z)`.
- Add `eq.cross_zone_move_instance_by_client_name(client_name, zone_short_name, x, y, z, heading)`.

# Notes
- Allows operators to send players to specific coordinates across zones instead of always sending to safe coordinates.
2023-09-17 13:16:25 -05:00
Alex King 06337fe762 [Feature] Add Defensive Proc Rules for Level Gap Penalty (#3580)
# Notes
- Allows operators to modify the level gap penalty and level gap required for the penalty for defensive procs' level gap penalty.
- Setting `Spells:DefensiveProcPenaltyLevelGap` to `-1` will disable the penalty.
2023-09-17 13:15:51 -05:00
hg 604c7ad4ab [Feature] Add opcodes for Cast and Scribe book buttons (#3578)
This is just the packet framework for the Scribe button on recipe books
and the Cast Spell button on books that allow casting spells on
targets. It will need to be hooked up to a content implementation
2023-09-17 13:14:38 -05:00
Alex King bab16771aa [Quest API] Add ApplySpell() and SetBuffDuration() overloads to Perl/Lua (#3576)
# Perl
- Add `$bot->ApplySpell(spell_id, duration, level)`.
- Add `$bot->ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellGroup(spell_id, duration, level)`.
- Add `$bot->ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellRaid(spell_id)`.
- Add `$bot->ApplySpellRaid(spell_id, duration)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$bot->SetSpellDuration(spell_id, duration, level)`.
- Add `$bot->SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationGroup(spell_id, duration, level)`.
- Add `$bot->SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationRaid(spell_id)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpell(spell_id, duration, level)`.
- Add `$client->ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellGroup(spell_id, duration, level)`.
- Add `$client->ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->SetSpellDuration(spell_id, duration, level)`.
- Add `$client->SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, level)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$mob->ApplySpellBuff(spell_id, duration, level)`.
- Add `$mob->SetSpellDuration(spell_id, duration, level)`.

# Lua
- Add `bot:ApplySpell(spell_id, duration, level)`.
- Add `bot:ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellGroup(spell_id, duration, level)`.
- Add `bot:ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellRaid(spell_id)`.
- Add `bot:ApplySpellRaid(spell_id, duration)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `bot:SetSpellDuration(spell_id, duration, level)`.
- Add `bot:SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationGroup(spell_id, duration, level)`.
- Add `bot:SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:ApplySpell(spell_id, duration, level)`.
- Add `client:ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellGroup(spell_id, duration, level)`.
- Add `client:ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellRaid(spell_id, duration, level)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `client:SetSpellDuration(spell_id, duration, level)`.
- Add `client:SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationGroup(spell_id, duration, level)`.
- Add `client:SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `mob:ApplySpellBuff(spell_id, duration, level)`.
- Add `mob:SetSpellDuration(spell_id, duration, level)`.

# Notes
- This allows operators to override the spell level.
2023-09-17 13:14:13 -05:00
Alex d3a414a048 [Fixes] AA System Fixes (#3572)
* -Always load AAs beyond our current expansion (Will need this for refunding invalid AAs).
-AAs beyond our current expansion will no longer be buyable or sendable to clients.

* #reload aa will now reload character aa data.

* Base Implementation of auto grant AA

* -Add DB manifest entry
-Made has already purchased fn a bit better
-Added auto grant to db entry

* -Added grantaa command.
-Reworked grantaa to not spam the client with packets, it still does spam messages because the feedback is important.

* Port suggested changes for Finish AA purchase.

---------

Co-authored-by: KimLS <KimLS@peqtgc.com>
2023-09-17 13:12:43 -05:00
Paul Coene e85a8db8c4 [Messages] Swarm pet normal damage messages were missing (#3594) 2023-09-17 08:26:09 -04:00
Fryguy 12cc3c90ea [Bug] Additional Wild Ramp param was causing an overflow it appears at least on local testing. (#3589)
* [Logging] Add logging to track down Wild Ramp issue

* [Bug] Additional Wild Ramp param was causing an overflow it appears at least on local testing.
2023-09-11 15:57:04 -05:00
Paul Coene 9c656bc498 [Messages] Remove duplicate message on tracking begin (#3574) 2023-09-11 08:27:25 -04:00
Fryguy bc337979bb [Logging] Add logging to track down Wild Ramp issue (#3588) 2023-09-10 21:02:44 -05:00
Paul Coene a64425ebe6 [Commands] npc_edit faction and #setfaction duplicate and incorrect. (#3577)
* [Commands] npc_edit faction and #setfaction duplicate and incorrect.

* Fix assignment
2023-09-02 21:21:48 -04:00
Alex King ca933fce45 [Bug Fix] Fix #set faction/#setfaction Command (#3575)
# Notes
- This was an oversight on my part in `#set` command consolidation.
2023-09-02 17:30:40 -04:00
63 changed files with 2209 additions and 724 deletions
+39
View File
@@ -1,3 +1,42 @@
## [22.26.0] - 09/17/2023
### Bug
* Additional Wild Ramp param was causing an overflow it appears at least on local testing. ([#3589](https://github.com/EQEmu/Server/pull/3589)) @fryguy503 2023-09-11
### Commands
* npc_edit faction and #setfaction duplicate and incorrect. ([#3577](https://github.com/EQEmu/Server/pull/3577)) @noudess 2023-09-03
### Feature
* Add Defensive Proc Rules for Level Gap Penalty ([#3580](https://github.com/EQEmu/Server/pull/3580)) @Kinglykrab 2023-09-17
* Add opcodes for Cast and Scribe book buttons ([#3578](https://github.com/EQEmu/Server/pull/3578)) @hgtw 2023-09-17
* Cleanup Group Split Money Logic ([#3583](https://github.com/EQEmu/Server/pull/3583)) @crdunwel 2023-09-17
### Fixes
* AA System Fixes ([#3572](https://github.com/EQEmu/Server/pull/3572)) @KimLS 2023-09-17
* Check for Song Skill Increase on Bard Pulse ([#3586](https://github.com/EQEmu/Server/pull/3586)) @crdunwel 2023-09-17
* Fix #set faction/#setfaction Command ([#3575](https://github.com/EQEmu/Server/pull/3575)) @Kinglykrab 2023-09-02
* Fix Killed XYZH support in EVENT_DEATH in Perl. ([#3591](https://github.com/EQEmu/Server/pull/3591)) @Kinglykrab 2023-09-17
* Fix entity ID on death with #castspell ([#3592](https://github.com/EQEmu/Server/pull/3592)) @Kinglykrab 2023-09-17
* Zoning logging edge case safety @Akkadius 2023-08-29
### Logging
* Add logging to track down Wild Ramp issue ([#3588](https://github.com/EQEmu/Server/pull/3588)) @fryguy503 2023-09-11
### Messages
* Remove duplicate message on tracking begin ([#3574](https://github.com/EQEmu/Server/pull/3574)) @noudess 2023-09-11
* Swarm pet normal damage messages were missing ([#3594](https://github.com/EQEmu/Server/pull/3594)) @noudess 2023-09-17
### Quest API
* Add ApplySpell() and SetBuffDuration() overloads to Perl/Lua ([#3576](https://github.com/EQEmu/Server/pull/3576)) @Kinglykrab 2023-09-17
* Add XYZ/XYZH Overloads to Cross Zone Move Methods ([#3581](https://github.com/EQEmu/Server/pull/3581)) @Kinglykrab 2023-09-17
## [22.25.0] - 08/28/2023
### Bots
@@ -4930,6 +4930,17 @@ CREATE TABLE `character_stats_record` (
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`character_id`)
);
)"
},
ManifestEntry{
.version = 9236,
.description = "2023_08_24_aa_ability_auto_grant.sql",
.check = "SHOW COLUMNS FROM `aa_ability` LIKE 'auto_grant_enabled';",
.condition = "empty",
.match = "",
.sql = R"(
ALTER TABLE `aa_ability` ADD COLUMN `auto_grant_enabled` TINYINT(4) NOT NULL DEFAULT '0' AFTER `reset_on_death`;
UPDATE `aa_ability` SET `auto_grant_enabled` = 1 WHERE `grant_only` = 0 AND `charges` = 0 AND `category` = -1;
)"
},
+1
View File
@@ -62,6 +62,7 @@ N(OP_BeginCast),
N(OP_Bind_Wound),
N(OP_BlockedBuffs),
N(OP_BoardBoat),
N(OP_BookButton),
N(OP_Buff),
N(OP_BuffCreate),
N(OP_BuffRemoveRequest),
+13 -3
View File
@@ -2559,7 +2559,10 @@ struct GMEmoteZone_Struct {
struct BookText_Struct {
uint8 window; // where to display the text (0xFF means new window)
uint8 type; //type: 0=scroll, 1=book, 2=item info.. prolly others.
uint32 invslot; // Only used in SoF and later clients.
int16 invslot; // Only used in SoF and later clients.
int32 target_id;
int8 can_cast;
int8 can_scribe;
char booktext[1]; // Variable Length
};
// This is the request to read a book.
@@ -2568,11 +2571,18 @@ struct BookText_Struct {
struct BookRequest_Struct {
uint8 window; // where to display the text (0xFF means new window)
uint8 type; //type: 0=scroll, 1=book, 2=item info.. prolly others.
uint32 invslot; // Only used in Sof and later clients;
int16 subslot; // The subslot inside of a bag if it is inside one.
int16 invslot; // Only used in Sof and later clients;
int32 target_id;
char txtfile[20];
};
// used by Scribe and CastSpell book buttons
struct BookButton_Struct
{
int16 invslot; // server slot
int32 target_id;
};
/*
** Object/Ground Spawn struct
** Used for Forges, Ovens, ground spawns, items dropped to ground, etc
+17 -3
View File
@@ -2785,7 +2785,10 @@ namespace RoF2
else
eq->window = emu->window;
OUT(type);
OUT(invslot);
eq->invslot = ServerToRoF2TypelessSlot(emu->invslot, invtype::typePossessions);
OUT(target_id);
OUT(can_cast);
OUT(can_scribe);
strn0cpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
FINISH_ENCODE();
@@ -4411,6 +4414,17 @@ namespace RoF2
FINISH_DIRECT_DECODE();
}
DECODE(OP_BookButton)
{
DECODE_LENGTH_EXACT(structs::BookButton_Struct);
SETUP_DIRECT_DECODE(BookButton_Struct, structs::BookButton_Struct);
emu->invslot = static_cast<int16_t>(RoF2ToServerTypelessSlot(eq->slot, invtype::typePossessions));
IN(target_id);
FINISH_DIRECT_DECODE();
}
DECODE(OP_Buff)
{
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
@@ -5117,8 +5131,8 @@ namespace RoF2
SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct);
IN(type);
IN(invslot);
IN(subslot);
emu->invslot = static_cast<int16_t>(RoF2ToServerTypelessSlot(eq->invslot, invtype::typePossessions));
IN(target_id);
emu->window = (uint8)eq->window;
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
+1
View File
@@ -150,6 +150,7 @@ D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BazaarSearch)
D(OP_BlockedBuffs)
D(OP_BookButton)
D(OP_Buff)
D(OP_BuffRemoveRequest)
D(OP_CastSpell)
+17 -9
View File
@@ -2868,15 +2868,23 @@ struct BookText_Struct {
// This is just a "text file" on the server
// or in our case, the 'name' column in our books table.
struct BookRequest_Struct {
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ uint16 invslot; // Is the slot, but the RoF2 conversion causes it to fail. Turned to 0 since it isnt required anyway.
/*0006*/ int16 subslot; // Inventory sub-slot (0-x)
/*0008*/ uint16 unknown006; // Seen FFFF
/*0010*/ uint16 unknown008; // seen 0000
/*0012*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0016*/ uint32 unknown0012;
/*0020*/ uint16 unknown0016;
/*0022*/ char txtfile[8194];
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ TypelessInventorySlot_Struct invslot; // book ItemIndex (with int16_t alignment padding)
/*0012*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0016*/ uint32 target_id; // client's target when using the book
/*0020*/ uint8 can_cast; // show Cast Spell button in book window
/*0021*/ uint8 can_scribe; // show Scribe button in book window
/*0022*/ char txtfile[8194];
/*8216*/
};
// used by Scribe and CastSpell book buttons
struct BookButton_Struct
{
/*0000*/ TypelessInventorySlot_Struct slot; // book ItemIndex (with int16_t alignment padding)
/*0008*/ int32 target_id; // client's target when using the book button
/*0012*/ int32 unused; // always 0 from button packets
/*0016*/
};
/*
+16 -1
View File
@@ -1782,6 +1782,9 @@ namespace SoD
eq->window = emu->window;
OUT(type);
eq->invslot = ServerToSoDSlot(emu->invslot);
OUT(target_id);
OUT(can_cast);
OUT(can_scribe);
strn0cpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
FINISH_ENCODE();
@@ -2817,6 +2820,17 @@ namespace SoD
FINISH_DIRECT_DECODE();
}
DECODE(OP_BookButton)
{
DECODE_LENGTH_EXACT(structs::BookButton_Struct);
SETUP_DIRECT_DECODE(BookButton_Struct, structs::BookButton_Struct);
emu->invslot = static_cast<int16_t>(SoDToServerSlot(eq->invslot));
IN(target_id);
FINISH_DIRECT_DECODE();
}
DECODE(OP_Buff)
{
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
@@ -3364,7 +3378,8 @@ namespace SoD
SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct);
IN(type);
emu->invslot = SoDToServerSlot(eq->invslot);
emu->invslot = static_cast<int16_t>(SoDToServerSlot(eq->invslot));
IN(target_id);
emu->window = (uint8)eq->window;
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
+1
View File
@@ -103,6 +103,7 @@ D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BazaarSearch)
D(OP_BookButton)
D(OP_Buff)
D(OP_CastSpell)
D(OP_ChannelMessage)
+15 -6
View File
@@ -2351,12 +2351,21 @@ struct BookText_Struct {
// This is just a "text file" on the server
// or in our case, the 'name' column in our books table.
struct BookRequest_Struct {
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ uint32 invslot; // The inventory slot the book is in. Not used, but echoed in the response packet.
/*0008*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0012*/ uint32 unknown0012;
/*0016*/ uint16 unknown0016;
/*0018*/ char txtfile[8194];
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ uint32 invslot; // The inventory slot the book is in
/*0008*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0012*/ uint32 target_id;
/*0016*/ uint8 can_cast;
/*0017*/ uint8 can_scribe;
/*0018*/ char txtfile[8194];
};
// used by Scribe and CastSpell book buttons
struct BookButton_Struct
{
/*0000*/ int32 invslot;
/*0004*/ int32 target_id; // client's target when using the book
/*0008*/ int32 unused; // always 0 from button packets
};
/*
+16 -1
View File
@@ -1452,6 +1452,9 @@ namespace SoF
eq->window = emu->window;
OUT(type);
eq->invslot = ServerToSoFSlot(emu->invslot);
OUT(target_id);
OUT(can_cast);
OUT(can_scribe);
strn0cpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
FINISH_ENCODE();
@@ -2261,6 +2264,17 @@ namespace SoF
FINISH_DIRECT_DECODE();
}
DECODE(OP_BookButton)
{
DECODE_LENGTH_EXACT(structs::BookButton_Struct);
SETUP_DIRECT_DECODE(BookButton_Struct, structs::BookButton_Struct);
emu->invslot = static_cast<int16_t>(SoFToServerSlot(eq->invslot));
IN(target_id);
FINISH_DIRECT_DECODE();
}
DECODE(OP_Buff)
{
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
@@ -2769,7 +2783,8 @@ namespace SoF
SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct);
IN(type);
emu->invslot = SoFToServerSlot(eq->invslot);
emu->invslot = static_cast<int16_t>(SoFToServerSlot(eq->invslot));
IN(target_id);
emu->window = (uint8)eq->window;
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
+1
View File
@@ -94,6 +94,7 @@ D(OP_AltCurrencySellSelection)
D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BookButton)
D(OP_Buff)
D(OP_Bug)
D(OP_CastSpell)
+15 -6
View File
@@ -2321,12 +2321,21 @@ struct BookText_Struct {
// This is just a "text file" on the server
// or in our case, the 'name' column in our books table.
struct BookRequest_Struct {
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ uint32 invslot; // The inventory slot the book is in. Not used, but echoed in the response packet.
/*0008*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0012*/ uint32 unknown0012;
/*0016*/ uint16 unknown0016;
/*0018*/ char txtfile[8194];
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ uint32 invslot; // The inventory slot the book is in
/*0008*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0012*/ uint32 target_id;
/*0016*/ uint8 can_cast;
/*0017*/ uint8 can_scribe;
/*0018*/ char txtfile[8194];
};
// used by Scribe and CastSpell book buttons
struct BookButton_Struct
{
/*0000*/ int32 invslot;
/*0004*/ int32 target_id; // client's target when using the book
/*0008*/ int32 unused; // always 0 from button packets
};
/*
+16 -1
View File
@@ -2027,6 +2027,9 @@ namespace UF
eq->window = emu->window;
OUT(type);
eq->invslot = ServerToUFSlot(emu->invslot);
OUT(target_id);
OUT(can_cast);
OUT(can_scribe);
strn0cpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
FINISH_ENCODE();
@@ -3105,6 +3108,17 @@ namespace UF
FINISH_DIRECT_DECODE();
}
DECODE(OP_BookButton)
{
DECODE_LENGTH_EXACT(structs::BookButton_Struct);
SETUP_DIRECT_DECODE(BookButton_Struct, structs::BookButton_Struct);
emu->invslot = static_cast<int16_t>(UFToServerSlot(eq->invslot));
IN(target_id);
FINISH_DIRECT_DECODE();
}
DECODE(OP_Buff)
{
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
@@ -3664,7 +3678,8 @@ namespace UF
SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct);
IN(type);
emu->invslot = UFToServerSlot(eq->invslot);
emu->invslot = static_cast<int16_t>(UFToServerSlot(eq->invslot));
IN(target_id);
emu->window = (uint8)eq->window;
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
+1
View File
@@ -110,6 +110,7 @@ D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BazaarSearch)
D(OP_BookButton)
D(OP_Buff)
D(OP_BuffRemoveRequest)
D(OP_CastSpell)
+15 -6
View File
@@ -2400,12 +2400,21 @@ struct BookText_Struct {
// This is just a "text file" on the server
// or in our case, the 'name' column in our books table.
struct BookRequest_Struct {
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ uint32 invslot; // The inventory slot the book is in. Not used, but echoed in the response packet.
/*0008*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0012*/ uint32 unknown0012;
/*0016*/ uint16 unknown0016;
/*0018*/ char txtfile[8194];
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
/*0004*/ uint32 invslot; // The inventory slot the book is in
/*0008*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
/*0012*/ uint32 target_id;
/*0016*/ uint8 can_cast;
/*0017*/ uint8 can_scribe;
/*0018*/ char txtfile[8194];
};
// used by Scribe and CastSpell book buttons
struct BookButton_Struct
{
/*0000*/ int32 invslot;
/*0004*/ int32 target_id; // client's target when using the book
/*0008*/ int32 unused; // always 0 from button packets
};
/*
+3
View File
@@ -454,6 +454,8 @@ RULE_INT(Spells, ResurrectionEffectBlock, 2, "0 = allow overwrites/rule disabled
RULE_BOOL(Spells, WaterMatchRequiredForLoS, true, "Enable/Disable the requirement of both the attacker/victim being both in or out of water for spells LoS to pass.")
RULE_INT(Spells, WizardCritMinimumRandomRatio, 20, "The minimum value for the random range which Wizards and Caster DPS Mercs innately have for spell crit ratio. Set to 20 for vanilla values.")
RULE_INT(Spells, WizardCritMaximumRandomRatio, 70, "The maximum value for the random range which Wizards and Caster DPS Mercs innately have for spell crit ratio. Set to 70 for vanilla values.")
RULE_INT(Spells, DefensiveProcPenaltyLevelGap, 6, "Defensive Proc Penalty Level Gap where procs start losing their proc rate at RuleR(Spells, DefensiveProcPenaltyModifier)% per level difference")
RULE_REAL(Spells, DefensiveProcPenaltyLevelGapModifier, 10.0f, "Defensive Proc Penalty Level Gap Modifier where procs start losing their proc rate at defined % after RuleI(Spells, DefensiveProcLevelGap) level difference")
RULE_CATEGORY_END()
RULE_CATEGORY(Combat)
@@ -820,6 +822,7 @@ RULE_CATEGORY_END()
RULE_CATEGORY(Expansion)
RULE_INT(Expansion, CurrentExpansion, -1, "The current expansion enabled for the server [-1 = ALL, 0 = Classic, 1 = Kunark etc.]")
RULE_BOOL(Expansion, UseCurrentExpansionAAOnly, false, "When true will only load AA ranks that match CurrentExpansion rule")
RULE_INT(Expansion, AutoGrantAAExpansion, -1, "Expansion to auto grant AAs up to, [-1 = Disabled, 0 = Classic, 1 = Kunark etc.]")
RULE_CATEGORY_END()
RULE_CATEGORY(Instances)
+70 -67
View File
@@ -10,6 +10,7 @@
#include <cereal/types/chrono.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
#include <glm/vec4.hpp>
#define SERVER_TIMEOUT 45000 // how often keepalive gets sent
#define INTERSERVER_TIMER 10000
@@ -1486,95 +1487,96 @@ struct CZClientMessageString_Struct {
struct CZDialogueWindow_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
char message[4096];
char client_name[64]; // Only used by Character Name Type, else empty
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
char message[4096];
char client_name[64]; // Only used by Character Name Type, else empty
};
struct CZLDoNUpdate_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Loss, 1 - Points, 2 - Win
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Loss, 1 - Points, 2 - Win
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint32 theme_id;
int points; // Only used in Points Subtype, else 1
char client_name[64]; // Only used by Character Name Type, else empty
int points; // Only used in Points Subtype, else 1
char client_name[64]; // Only used by Character Name Type, else empty
};
struct CZMarquee_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint32 type;
uint32 priority;
uint32 fade_in;
uint32 fade_out;
uint32 duration;
char message[512];
char client_name[64]; // Only used by Character Name Type, else empty
char message[512];
char client_name[64]; // Only used by Character Name Type, else empty
};
struct CZMessage_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
int update_identifier; // Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
int update_identifier; // Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint32 type;
char message[512];
char client_name[64]; // Only used by Character Name Type, else empty
char message[512];
char client_name[64]; // Only used by Character Name Type, else empty
};
struct CZMove_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Move Zone, 1 - Move Zone Instance
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint16 instance_id; // Only used by Move Zone Instance, else 0
char zone_short_name[32]; // Only by with Move Zone, else empty
char client_name[64]; // Only used by Character Name Type, else empty
std::string client_name = std::string(); // Only used by Character Name Type, else empty
glm::vec4 coordinates = glm::vec4(0.f); // XYZ or XYZH, heading is optional, defaults to 0.
uint16 instance_id = 0; // Only used by Move Zone Instance, else 0
uint32 update_identifier = 0; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Move Zone, 1 - Move Zone Instance
std::string zone_short_name = std::string(); // Only used by Move Zone, else empty
};
struct CZSetEntityVariable_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name, 6 - NPC
int update_identifier; // Group ID, Raid ID, Guild ID, Expedition ID, or NPC ID based on update type, 0 for Character Name
char variable_name[256];
char variable_value[256];
char client_name[64]; // Only used by Character Type, else empty
int update_identifier; // Group ID, Raid ID, Guild ID, Expedition ID, or NPC ID based on update type, 0 for Character Name
char variable_name[256];
char variable_value[256];
char client_name[64]; // Only used by Character Type, else empty
};
struct CZSignal_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name, 6 - NPC
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, Expedition ID, or NPC ID based on update type, 0 for Character Name
int signal_id;
char client_name[64]; // Only used by Character Name Type, else empty
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, Expedition ID, or NPC ID based on update type, 0 for Character Name
int signal_id;
char client_name[64]; // Only used by Character Name Type, else empty
};
struct CZSpell_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Cast Spell, 1 - Remove Spell
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Cast Spell, 1 - Remove Spell
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint32 spell_id;
char client_name[64]; // Only used by Character Name Type, else empty
char client_name[64]; // Only used by Character Name Type, else empty
};
struct CZTaskUpdate_Struct {
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Activity Reset, 1 - Activity Update, 2 - Assign Task, 3 - Disable Task, 4 - Enable Task, 5 - Fail Task, 6 - Remove Task
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint8 update_type; // 0 - Character, 1 - Group, 2 - Raid, 3 - Guild, 4 - Expedition, 5 - Character Name
uint8 update_subtype; // 0 - Activity Reset, 1 - Activity Update, 2 - Assign Task, 3 - Disable Task, 4 - Enable Task, 5 - Fail Task, 6 - Remove Task
int update_identifier; // Character ID, Group ID, Raid ID, Guild ID, or Expedition ID based on update type, 0 for Character Name
uint32 task_identifier;
int task_subidentifier; // Activity ID for Activity Reset and Activity Update, NPC Entity ID for Assign Task, else -1
int update_count; // Only used by Activity Update, else 1
bool enforce_level_requirement; // Only used by Assign Task
char client_name[64]; // Only used by Character Name Type, else empty
int task_subidentifier; // Activity ID for Activity Reset and Activity Update, NPC Entity ID for Assign Task, else -1
int update_count; // Only used by Activity Update, else 1
bool enforce_level_requirement; // Only used by Assign Task
char client_name[64]; // Only used by Character Name Type, else empty
};
struct WWDialogueWindow_Struct {
char message[4096];
char message[4096];
uint8 min_status;
uint8 max_status;
};
struct WWLDoNUpdate_Struct {
uint8 update_type; // 0 - Loss, 1 - Points, 2 - Win
uint8 update_type; // 0 - Loss, 1 - Points, 2 - Win
uint32 theme_id;
int points; // Only used in Points Subtype, else 1
uint8 min_status;
uint8 max_status;
int points; // Only used in Points Subtype, else 1
uint8 min_status;
uint8 max_status;
};
struct WWMarquee_Struct {
@@ -1583,56 +1585,57 @@ struct WWMarquee_Struct {
uint32 fade_in;
uint32 fade_out;
uint32 duration;
char message[512];
uint8 min_status;
uint8 max_status;
char message[512];
uint8 min_status;
uint8 max_status;
};
struct WWMessage_Struct {
uint32 type;
char message[512];
uint8 min_status;
uint8 max_status;
char message[512];
uint8 min_status;
uint8 max_status;
};
struct WWMove_Struct {
uint8 update_type; // 0 - Move Zone, 1 - Move Zone Instance
char zone_short_name[32]; // Used with Move Zone
uint8 update_type; // 0 - Move Zone, 1 - Move Zone Instance
char zone_short_name[32]; // Used with Move Zone
uint16 instance_id; // Used with Move Zone Instance
uint8 min_status;
uint8 max_status;
uint8 min_status;
uint8 max_status;
};
struct WWSetEntityVariable_Struct {
uint8 update_type; // 0 - Character, 1 - NPC
char variable_name[256];
char variable_value[256];
char variable_name[256];
char variable_value[256];
uint8 min_status;
uint8 max_status;
};
struct WWSignal_Struct {
uint8 update_type; // 0 - Character, 1 - NPC
int signal_id;
int signal_id;
uint8 min_status;
uint8 max_status;
};
struct WWSpell_Struct {
uint8 update_type; // 0 - Cast Spell, 1 - Remove Spell
uint8 update_type; // 0 - Cast Spell, 1 - Remove Spell
uint32 spell_id;
uint8 min_status;
uint8 max_status;
uint8 min_status;
uint8 max_status;
};
struct WWTaskUpdate_Struct {
uint8 update_type; // 0 - Activity Reset, 1 - Activity Update, 2 - Assign Task, 3 - Disable Task, 4 - Enable Task, 5 - Fail Task, 6 - Remove Task
uint8 update_type; // 0 - Activity Reset, 1 - Activity Update, 2 - Assign Task, 3 - Disable Task, 4 - Enable Task, 5 - Fail Task, 6 - Remove Task
uint32 task_identifier;
int task_subidentifier; // Activity ID for Activity Reset and Activity Update, NPC Entity ID for Assign Task, else -1
int update_count; // Update Count for Activity Update, else 1
bool enforce_level_requirement; // Only used by Assign Task, else false
uint8 min_status;
uint8 max_status;
int task_subidentifier; // Activity ID for Activity Reset and Activity Update, NPC Entity ID for Assign Task, else -1
int update_count; // Update Count for Activity Update, else 1
bool enforce_level_requirement; // Only used by Assign Task, else false
uint8 min_status;
uint8 max_status;
};
struct ReloadWorld_Struct {
+1 -1
View File
@@ -25,7 +25,7 @@
// Build variables
// these get injected during the build pipeline
#define CURRENT_VERSION "22.25.0-dev" // always append -dev to the current version for custom-builds
#define CURRENT_VERSION "22.26.0-dev" // always append -dev to the current version for custom-builds
#define LOGIN_VERSION "0.8.0"
#define COMPILE_DATE __DATE__
#define COMPILE_TIME __TIME__
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "eqemu-server",
"version": "22.25.0",
"version": "22.26.0",
"repository": {
"type": "git",
"url": "https://github.com/EQEmu/Server.git"
+1
View File
@@ -370,6 +370,7 @@ OP_AggroMeterTargetInfo=0x16bc
OP_AggroMeterUpdate=0x1781
OP_UnderWorld=0x2eb3 # clients sends up when they detect an underworld issue, might be useful for cheat detection
OP_KickPlayers=0x6770
OP_BookButton=0x6146
# Expeditions
OP_DzQuit=0xb2e3
+1
View File
@@ -360,6 +360,7 @@ OP_Marquee=0x7dc9
OP_Fling=0x2b88
OP_CancelSneakHide=0x7705
OP_UnderWorld=0x51ae # clients sends up when they detect an underworld issue, might be useful for cheat detection
OP_BookButton=0x4348
# Expedition
OP_DzQuit=0x054e
+1
View File
@@ -341,6 +341,7 @@ OP_Marquee=0x2f75
OP_Untargetable=0x3e36
OP_CancelSneakHide=0x5335
OP_UnderWorld=0x7580 # clients sends up when they detect an underworld issue, might be useful for cheat detection
OP_BookButton=0x4eee
#expedition
OP_DzQuit=0x20d6
+1
View File
@@ -371,6 +371,7 @@ OP_Marquee=0x3675
OP_Fling=0x51b1
OP_CancelSneakHide=0x7686
OP_UnderWorld=0x2d9d # clients sends up when they detect an underworld issue, might be useful for cheat detection
OP_BookButton=0x018e
OP_DzQuit=0x1539
OP_DzListTimers=0x21e9
+12 -7
View File
@@ -1226,15 +1226,20 @@ void ConsoleCrossZoneMove(
}
auto pack = new ServerPacket(ServerOP_CZMove, sizeof(CZMove_Struct));
auto* CZM = (CZMove_Struct*) pack->pBuffer;
auto m = (CZMove_Struct*) pack->pBuffer;
CZM->update_type = update_type;
CZM->update_subtype = !instance_id ? CZMoveUpdateSubtype_MoveZone : CZMoveUpdateSubtype_MoveZoneInstance;
CZM->update_identifier = update_identifier;
CZM->instance_id = instance_id;
if (!name.empty()) {
m->client_name = name;
}
strn0cpy(CZM->zone_short_name, zone_short_name.c_str(), sizeof(CZM->zone_short_name));
strn0cpy(CZM->client_name, name.c_str(), sizeof(CZM->client_name));
m->instance_id = instance_id;
m->update_identifier = update_identifier;
m->update_type = update_type;
m->update_subtype = !instance_id ? CZMoveUpdateSubtype_MoveZone : CZMoveUpdateSubtype_MoveZoneInstance;
if (!zone_short_name.empty()) {
m->zone_short_name = zone_short_name;
}
zoneserver_list.SendPacket(pack);
safe_delete(pack);
+170 -33
View File
@@ -1111,7 +1111,7 @@ void Client::PurchaseAlternateAdvancementRank(int rank_id) {
return;
}
FinishAlternateAdvancementPurchase(rank, false);
FinishAlternateAdvancementPurchase(rank, false, true);
}
bool Client::GrantAlternateAdvancementAbility(int aa_id, int points, bool ignore_cost) {
@@ -1134,13 +1134,13 @@ bool Client::GrantAlternateAdvancementAbility(int aa_id, int points, bool ignore
}
ret = true;
FinishAlternateAdvancementPurchase(rank, ignore_cost);
FinishAlternateAdvancementPurchase(rank, ignore_cost, true);
}
return ret;
}
void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost) {
void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost, bool send_message_and_save) {
auto rank_id = rank->base_ability->first_rank_id;
if (rank->base_ability->charges) {
@@ -1156,7 +1156,7 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
SetAA(rank_id, rank->current_value, 0);
//if not max then send next aa
if (rank->next) {
if (rank->next && send_message_and_save) {
SendAlternateAdvancementRank(rank->base_ability->id, rank->next->current_value);
}
}
@@ -1164,10 +1164,12 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
auto cost = !ignore_cost ? rank->cost : 0;
m_pp.aapoints -= static_cast<uint32>(cost);
SaveAA();
SendAlternateAdvancementPoints();
SendAlternateAdvancementStats();
if (send_message_and_save) {
SaveAA();
SendAlternateAdvancementPoints();
SendAlternateAdvancementStats();
}
if (player_event_logs.IsEventEnabled(PlayerEvent::AA_PURCHASE)) {
auto e = PlayerEvent::AAPurchasedEvent{
@@ -1181,14 +1183,16 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
}
if (rank->prev) {
MessageString(
Chat::Yellow,
AA_IMPROVE,
std::to_string(rank->title_sid).c_str(),
std::to_string(rank->prev->current_value).c_str(),
std::to_string(cost).c_str(),
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str()
);
if (send_message_and_save) {
MessageString(
Chat::Yellow,
AA_IMPROVE,
std::to_string(rank->title_sid).c_str(),
std::to_string(rank->prev->current_value).c_str(),
std::to_string(cost).c_str(),
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str()
);
}
/* QS: Player_Log_AA_Purchases */
if (RuleB(QueryServ, PlayerLogAAPurchases)) {
@@ -1203,13 +1207,15 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
QServ->PlayerLogEvent(Player_Log_AA_Purchases, CharacterID(), event_desc);
}
} else {
MessageString(
Chat::Yellow,
AA_GAIN_ABILITY,
std::to_string(rank->title_sid).c_str(),
std::to_string(cost).c_str(),
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str()
);
if (send_message_and_save) {
MessageString(
Chat::Yellow,
AA_GAIN_ABILITY,
std::to_string(rank->title_sid).c_str(),
std::to_string(cost).c_str(),
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str()
);
}
/* QS: Player_Log_AA_Purchases */
if (RuleB(QueryServ, PlayerLogAAPurchases)) {
@@ -1594,6 +1600,15 @@ bool Mob::CanUseAlternateAdvancementRank(AA::Rank *rank) {
}
}
int expansion = RuleI(Expansion, CurrentExpansion);
bool use_expansion_aa = RuleB(Expansion, UseCurrentExpansionAAOnly);
if (use_expansion_aa && expansion >= 0) {
if (rank->expansion > expansion) {
return false;
}
}
if (IsClient()) {
if (rank->expansion && !(CastToClient()->GetPP().expansions & (1 << (rank->expansion - 1)))) {
return false;
@@ -1645,6 +1660,10 @@ bool Mob::CanPurchaseAlternateAdvancementRank(AA::Rank *rank, bool check_price,
return false;
}
if (IsClient() && CastToClient()->HasAlreadyPurchasedRank(rank)) {
return false;
}
//You can't purchase grant only AAs they can only be assigned
if(check_grant && ability->grant_only) {
return false;
@@ -1764,7 +1783,7 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
{
abilities.clear();
std::string query = "SELECT id, name, category, classes, races, deities, drakkin_heritage, status, type, charges, "
"grant_only, reset_on_death, first_rank_id FROM aa_ability WHERE enabled = 1";
"grant_only, reset_on_death, auto_grant_enabled, first_rank_id FROM aa_ability WHERE enabled = 1";
auto results = QueryDatabase(query);
if(results.Success()) {
for(auto row = results.begin(); row != results.end(); ++row) {
@@ -1782,7 +1801,8 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
ability->charges = Strings::ToInt(row[9]);
ability->grant_only = Strings::ToBool(row[10]);
ability->reset_on_death = Strings::ToBool(row[11]);
ability->first_rank_id = Strings::ToInt(row[12]);
ability->auto_grant_enabled = Strings::ToBool(row[12]);
ability->first_rank_id = Strings::ToInt(row[13]);
ability->first = nullptr;
abilities[ability->id] = std::unique_ptr<AA::Ability>(ability);
@@ -1793,17 +1813,11 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
}
LogInfo("Loaded [{}] Alternate Advancement Abilities", Strings::Commify((int)abilities.size()));
int expansion = RuleI(Expansion, CurrentExpansion);
bool use_expansion_aa = RuleB(Expansion, UseCurrentExpansionAAOnly);
ranks.clear();
if (use_expansion_aa && expansion >= 0) {
query = fmt::format("SELECT id, upper_hotkey_sid, lower_hotkey_sid, title_sid, desc_sid, cost, level_req, spell, spell_type, recast_time, "
"next_id, expansion FROM aa_ranks WHERE expansion <= {}", expansion);
} else {
query = "SELECT id, upper_hotkey_sid, lower_hotkey_sid, title_sid, desc_sid, cost, level_req, spell, spell_type, recast_time, "
query = "SELECT id, upper_hotkey_sid, lower_hotkey_sid, title_sid, desc_sid, cost, level_req, spell, spell_type, recast_time, "
"next_id, expansion FROM aa_ranks";
}
results = QueryDatabase(query);
if(results.Success()) {
for(auto row = results.begin(); row != results.end(); ++row) {
@@ -2068,3 +2082,126 @@ void Client::TogglePurchaseAlternativeAdvancementRank(int rank_id){
CalcBonuses();
}
void Client::AutoGrantAAPoints() {
int auto_grant_expansion = RuleI(Expansion, AutoGrantAAExpansion);
if (auto_grant_expansion == -1) {
return;
}
//iterate through every AA
for (auto& iter : zone->aa_abilities) {
auto ability = iter.second.get();
if (ability->grant_only) {
continue;
}
if (ability->charges > 0) {
continue;
}
if (!ability->auto_grant_enabled) {
continue;
}
auto level = GetLevel();
auto p = 1;
auto rank = ability->first;
while (rank != nullptr) {
if (CanUseAlternateAdvancementRank(rank)) {
if (rank->expansion <= auto_grant_expansion && rank->level_req <= level && !HasAlreadyPurchasedRank(rank)) {
FinishAlternateAdvancementPurchase(rank, true, false);
if (rank->prev) {
MessageString(
Chat::Yellow,
AA_IMPROVE,
std::to_string(rank->title_sid).c_str(),
std::to_string(rank->prev->current_value).c_str(),
"0",
std::to_string(AA_POINTS).c_str()
);
}
else {
MessageString(
Chat::Yellow,
AA_GAIN_ABILITY,
std::to_string(rank->title_sid).c_str(),
"0",
std::to_string(AA_POINTS).c_str()
);
}
}
}
else {
break;
}
p++;
rank = rank->next;
}
}
SendClearAA();
SendAlternateAdvancementTable();
SendAlternateAdvancementPoints();
SendAlternateAdvancementStats();
}
void Client::GrantAllAAPoints()
{
//iterate through every AA
for (auto& iter : zone->aa_abilities) {
auto ability = iter.second.get();
if (ability->charges > 0) {
continue;
}
auto level = GetLevel();
auto p = 1;
auto rank = ability->first;
while (rank != nullptr) {
if (CanUseAlternateAdvancementRank(rank)) {
if (rank->level_req <= level && !HasAlreadyPurchasedRank(rank)) {
FinishAlternateAdvancementPurchase(rank, true, false);
}
}
else {
break;
}
p++;
rank = rank->next;
}
}
SaveAA();
SendClearAA();
SendAlternateAdvancementTable();
SendAlternateAdvancementPoints();
SendAlternateAdvancementStats();
}
bool Client::HasAlreadyPurchasedRank(AA::Rank *rank) {
auto iter = aa_ranks.find(rank->base_ability->id);
if (iter == aa_ranks.end()) {
return false;
}
auto ability_rank = zone->GetAlternateAdvancementAbilityAndRank(iter->first, iter->second.first);
auto ability = ability_rank.first;
auto current = ability_rank.second;
while (current != nullptr) {
if (current == rank) {
return true;
}
current = current->prev;
}
return false;
}
+1
View File
@@ -50,6 +50,7 @@ public:
int status;
bool grant_only;
bool reset_on_death;
bool auto_grant_enabled;
int type;
int charges;
int first_rank_id;
+13 -1
View File
@@ -1073,10 +1073,13 @@ bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage, ExtraAtt
if (aeRampage) {
float aeramp_size = RuleR(Combat, AERampageMaxDistance);
LogCombatDetail("AERampage: Default - aeramp_size = [{}] ", aeramp_size);
if (opts) {
if (opts->range_percent > 0) {
aeramp_size = opts->range_percent;
LogCombatDetail("AE Rampage: range_percent = [{}] -- aeramp_size [{}]", opts->range_percent, aeramp_size);
}
}
@@ -1087,8 +1090,17 @@ bool Mob::CombatRange(Mob* other, float fixed_size_mod, bool aeRampage, ExtraAtt
}
float ramp_range = size_mod * aeramp_size;
LogCombatDetail("AE Rampage: ramp_range = [{}] -- (size_mod [{}] * aeramp_size [{}])", ramp_range, size_mod, aeramp_size);
LogCombatDetail("AE Rampage: _DistNoRoot [{}] <= ramp_range [{}]", _DistNoRoot, ramp_range);
return _DistNoRoot <= ramp_range;
if (_DistNoRoot <= ramp_range) {
LogCombatDetail("AE Rampage: Combat Distance returned [true]");
return true;
} else {
LogCombatDetail("AE Rampage: Combat Distance returned [false]");
return false;
}
}
if (_DistNoRoot <= size_mod) {
+28 -21
View File
@@ -1741,7 +1741,8 @@ bool Client::Death(Mob* killerMob, int64 damage, uint16 spell, EQ::skills::Skill
static_cast<int>(attack_skill)
);
if (parse->EventPlayer(EVENT_DEATH, this, export_string, 0) != 0) {
std::vector<std::any> args = { CastToMob() };
if (parse->EventPlayer(EVENT_DEATH, this, export_string, 0, &args) != 0) {
if (GetHP() < 0) {
SetHP(0);
}
@@ -2388,7 +2389,8 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
static_cast<int>(attack_skill)
);
if (parse->EventNPC(EVENT_DEATH, this, oos, export_string, 0) != 0) {
std::vector<std::any> args = { CastToMob() };
if (parse->EventNPC(EVENT_DEATH, this, oos, export_string, 0, &args) != 0) {
if (GetHP() < 0) {
SetHP(0);
}
@@ -2405,7 +2407,9 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
spell,
static_cast<int>(attack_skill)
);
if (parse->EventBot(EVENT_DEATH, CastToBot(), oos, export_string, 0) != 0) {
std::vector<std::any> args = { CastToMob() };
if (parse->EventBot(EVENT_DEATH, CastToBot(), oos, export_string, 0, &args) != 0) {
if (GetHP() < 0) {
SetHP(0);
}
@@ -4226,7 +4230,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
//this was done to simplify the code here (since we can only effectively skip one mob on queue)
eqFilterType filter;
Mob* skip = attacker;
if (attacker && attacker->GetOwnerID()) {
if (attacker && attacker->GetOwner()) {
//attacker is a pet, let pet owners see their pet's damage
Mob* owner = attacker->GetOwner();
if (owner && owner->IsClient()) {
@@ -4539,8 +4543,8 @@ float Mob::GetDefensiveProcChances(float &ProcBonus, float &ProcChance, uint16 h
}
// argument 'weapon' not used
void Mob::TryDefensiveProc(Mob *on, uint16 hand) {
void Mob::TryDefensiveProc(Mob *on, uint16 hand)
{
if (!on) {
SetTarget(nullptr);
LogError("A null Mob object was passed to Mob::TryDefensiveProc for evaluation!");
@@ -4552,23 +4556,26 @@ void Mob::TryDefensiveProc(Mob *on, uint16 hand) {
}
if (!on->HasDied() && on->GetHP() > 0) {
float ProcChance, ProcBonus;
on->GetDefensiveProcChances(ProcBonus, ProcChance, hand, this);
float proc_chance, proc_bonus;
on->GetDefensiveProcChances(proc_bonus, proc_chance, hand, this);
if (hand == EQ::invslot::slotSecondary) {
ProcChance /= 2;
proc_chance /= 2;
}
int level_penalty = 0;
int level_diff = GetLevel() - on->GetLevel();
if (level_diff > 6) {//10% penalty per level if > 6 levels over target.
level_penalty = (level_diff - 6) * 10;
int level_penalty = 0;
int level_diff = GetLevel() - on->GetLevel();
int penalty_level_gap = RuleI(Spells, DefensiveProcPenaltyLevelGap);
if (
penalty_level_gap >= 0 &&
level_diff > penalty_level_gap
) {//10% penalty per level if > penalty_level_gap levels over target.
level_penalty = (level_diff - penalty_level_gap) * RuleR(Spells, DefensiveProcPenaltyLevelGapModifier);
}
ProcChance -= ProcChance*level_penalty / 100;
proc_chance -= proc_chance * level_penalty / 100;
if (ProcChance < 0) {
if (proc_chance < 0) {
return;
}
@@ -4576,7 +4583,7 @@ void Mob::TryDefensiveProc(Mob *on, uint16 hand) {
for (int i = 0; i < MAX_PROCS; i++) {
if (IsValidSpell(DefensiveProcs[i].spellID)) {
if (!IsProcLimitTimerActive(DefensiveProcs[i].base_spellID, DefensiveProcs[i].proc_reuse_time, ProcType::DEFENSIVE_PROC)) {
float chance = ProcChance * (static_cast<float>(DefensiveProcs[i].chance) / 100.0f);
float chance = proc_chance * (static_cast<float>(DefensiveProcs[i].chance) / 100.0f);
if (zone->random.Roll(chance)) {
ExecWeaponProc(nullptr, DefensiveProcs[i].spellID, on);
CheckNumHitsRemaining(NumHit::DefensiveSpellProcs, 0, DefensiveProcs[i].base_spellID);
@@ -4589,14 +4596,14 @@ void Mob::TryDefensiveProc(Mob *on, uint16 hand) {
//AA Procs
if (IsOfClientBot()) {
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
int32 aa_rank_id = aabonuses.DefensiveProc[i + +SBIndex::COMBAT_PROC_ORIGIN_ID];
int32 aa_spell_id = aabonuses.DefensiveProc[i + SBIndex::COMBAT_PROC_SPELL_ID];
int32 aa_proc_chance = 100 + aabonuses.DefensiveProc[i + SBIndex::COMBAT_PROC_RATE_MOD];
int32 aa_rank_id = aabonuses.DefensiveProc[i + +SBIndex::COMBAT_PROC_ORIGIN_ID];
int32 aa_spell_id = aabonuses.DefensiveProc[i + SBIndex::COMBAT_PROC_SPELL_ID];
int32 aa_proc_chance = 100 + aabonuses.DefensiveProc[i + SBIndex::COMBAT_PROC_RATE_MOD];
uint32 aa_proc_reuse_timer = aabonuses.DefensiveProc[i + SBIndex::COMBAT_PROC_REUSE_TIMER];
if (aa_rank_id) {
if (!IsProcLimitTimerActive(-aa_rank_id, aa_proc_reuse_timer, ProcType::DEFENSIVE_PROC)) {
float chance = ProcChance * (static_cast<float>(aa_proc_chance) / 100.0f);
float chance = proc_chance * (static_cast<float>(aa_proc_chance) / 100.0f);
if (zone->random.Roll(chance) && IsValidSpell(aa_spell_id)) {
ExecWeaponProc(nullptr, aa_spell_id, on);
SetProcLimitTimer(-aa_rank_id, aa_proc_reuse_timer, ProcType::DEFENSIVE_PROC);
+4 -2
View File
@@ -8568,6 +8568,7 @@ std::vector<Mob*> Bot::GetApplySpellList(
void Bot::ApplySpell(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only
@@ -8575,13 +8576,14 @@ void Bot::ApplySpell(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only);
for (const auto& m : l) {
m->ApplySpellBuff(spell_id, duration);
m->ApplySpellBuff(spell_id, duration, level);
}
}
void Bot::SetSpellDuration(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only
@@ -8589,7 +8591,7 @@ void Bot::SetSpellDuration(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only);
for (const auto& m : l) {
m->SetBuffDuration(spell_id, duration);
m->SetBuffDuration(spell_id, duration, level);
}
}
+2 -2
View File
@@ -584,7 +584,7 @@ public:
// "Quest API" Methods
bool HasBotSpellEntry(uint16 spellid);
void ApplySpell(int spell_id, int duration = 0, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
void ApplySpell(int spell_id, int duration = 0, int level = -1, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
void BreakInvis();
void Escape();
void Fling(float value, float target_x, float target_y, float target_z, bool ignore_los = false, bool clip_through_walls = false, bool calculate_speed = false);
@@ -593,7 +593,7 @@ public:
int32 GetAugmentIDAt(int16 slot_id, uint8 augslot);
int32 GetRawItemAC();
void SendSpellAnim(uint16 targetid, uint16 spell_id);
void SetSpellDuration(int spell_id, int duration = 0, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
void SetSpellDuration(int spell_id, int duration = 0, int level = -1, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
// "SET" Class Methods
void SetBotSpellID(uint32 newSpellID);
+11 -20
View File
@@ -2211,25 +2211,13 @@ void Client::ReadBook(BookRequest_Struct *book) {
if (ClientVersion() >= EQ::versions::ClientVersion::SoF) {
// Find out what slot the book was read from.
// SoF+ need to look up book type for the output message.
int16 read_from_slot;
if (book->subslot >= 0) {
uint16 offset;
offset = (book->invslot-23) * 10; // How many packs to skip.
read_from_slot = 251 + offset + book->subslot;
}
else {
read_from_slot = book->invslot -1;
}
const EQ::ItemInstance *inst = nullptr;
if (read_from_slot <= EQ::invbag::GENERAL_BAGS_END)
{
inst = m_inv[read_from_slot];
}
if (book->invslot <= EQ::invbag::GENERAL_BAGS_END)
{
inst = m_inv[book->invslot];
}
if(inst)
out->type = inst->GetItem()->Book;
@@ -2240,6 +2228,9 @@ void Client::ReadBook(BookRequest_Struct *book) {
out->type = book->type;
}
out->invslot = book->invslot;
out->target_id = book->target_id;
out->can_cast = 0; // todo: implement
out->can_scribe = 0; // todo: implement
memcpy(out->booktext, booktxt2.c_str(), length);
@@ -11090,8 +11081,6 @@ void Client::SetTrackingID(uint32 entity_id)
}
TrackingID = entity_id;
MessageString(Chat::Skills, TRACKING_BEGIN, m->GetCleanName());
}
int Client::GetRecipeMadeCount(uint32 recipe_id)
@@ -11290,6 +11279,7 @@ std::vector<Mob*> Client::GetApplySpellList(
void Client::ApplySpell(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only,
@@ -11298,13 +11288,14 @@ void Client::ApplySpell(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only, allow_bots);
for (const auto& m : l) {
m->ApplySpellBuff(spell_id, duration);
m->ApplySpellBuff(spell_id, duration, level);
}
}
void Client::SetSpellDuration(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only,
@@ -11313,7 +11304,7 @@ void Client::SetSpellDuration(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only, allow_bots);
for (const auto& m : l) {
m->SetBuffDuration(spell_id, duration);
m->SetBuffDuration(spell_id, duration, level);
}
}
+6 -1
View File
@@ -905,6 +905,9 @@ public:
int GetAAPoints() { return m_pp.aapoints; }
int GetSpentAA() { return m_pp.aapoints_spent; }
uint32 GetRequiredAAExperience();
void AutoGrantAAPoints();
void GrantAllAAPoints();
bool HasAlreadyPurchasedRank(AA::Rank* rank);
bool SendGMCommand(std::string message, bool ignore_status = false);
@@ -920,6 +923,7 @@ public:
void ApplySpell(
int spell_id,
int duration = 0,
int level = -1,
ApplySpellType apply_type = ApplySpellType::Solo,
bool allow_pets = false,
bool is_raid_group_only = true,
@@ -929,6 +933,7 @@ public:
void SetSpellDuration(
int spell_id,
int duration = 0,
int level = -1,
ApplySpellType apply_type = ApplySpellType::Solo,
bool allow_pets = false,
bool is_raid_group_only = true,
@@ -1662,7 +1667,7 @@ protected:
bool client_data_loaded;
void FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost);
void FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost, bool send_message_and_save);
Mob* bind_sight_target;
+26 -1
View File
@@ -145,6 +145,7 @@ void MapOpcodes()
ConnectedOpcodes[OP_Bind_Wound] = &Client::Handle_OP_Bind_Wound;
ConnectedOpcodes[OP_BlockedBuffs] = &Client::Handle_OP_BlockedBuffs;
ConnectedOpcodes[OP_BoardBoat] = &Client::Handle_OP_BoardBoat;
ConnectedOpcodes[OP_BookButton] = &Client::Handle_OP_BookButton;
ConnectedOpcodes[OP_Buff] = &Client::Handle_OP_Buff;
ConnectedOpcodes[OP_BuffRemoveRequest] = &Client::Handle_OP_BuffRemoveRequest;
ConnectedOpcodes[OP_Bug] = &Client::Handle_OP_Bug;
@@ -918,6 +919,8 @@ void Client::CompleteConnect()
RecordStats();
AutoGrantAAPoints();
// enforce some rules..
if (!CanEnterZone()) {
LogInfo("Kicking character [{}] from zone, not allowed here (missing requirements)", GetCleanName());
@@ -4128,6 +4131,28 @@ void Client::Handle_OP_BoardBoat(const EQApplicationPacket *app)
return;
}
void Client::Handle_OP_BookButton(const EQApplicationPacket* app)
{
if (app->size != sizeof(BookButton_Struct))
{
LogError("Size mismatch in OP_BookButton. expected [{}] got [{}]", sizeof(BookButton_Struct), app->size);
DumpPacket(app);
return;
}
BookButton_Struct* book = reinterpret_cast<BookButton_Struct*>(app->pBuffer);
const EQ::ItemInstance* const inst = GetInv().GetItem(book->invslot);
if (inst && inst->GetItem()->Book)
{
// todo: if scribe book learn recipes and delete book from inventory
// todo: if cast book use its spell on target and delete book from inventory (unless reusable?)
}
EQApplicationPacket outapp(OP_FinishWindow, 0);
QueuePacket(&outapp);
}
void Client::Handle_OP_Buff(const EQApplicationPacket *app)
{
/*
@@ -14398,7 +14423,7 @@ void Client::Handle_OP_Split(const EQApplicationPacket *app)
if (raid)
raid->SplitMoney(raid->GetGroup(this), split->copper, split->silver, split->gold, split->platinum);
else if (group)
group->SplitMoney(split->copper, split->silver, split->gold, split->platinum);
group->SplitMoney(split->copper, split->silver, split->gold, split->platinum, this);
return;
+1
View File
@@ -56,6 +56,7 @@
void Handle_OP_Bind_Wound(const EQApplicationPacket *app);
void Handle_OP_BlockedBuffs(const EQApplicationPacket *app);
void Handle_OP_BoardBoat(const EQApplicationPacket *app);
void Handle_OP_BookButton(const EQApplicationPacket *app);
void Handle_OP_Buff(const EQApplicationPacket *app);
void Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app);
void Handle_OP_Bug(const EQApplicationPacket *app);
+2
View File
@@ -137,6 +137,7 @@ int command_init(void)
command_add("givemoney", "[Platinum] [Gold] [Silver] [Copper] - Gives specified amount of money to you or your player target", AccountStatus::GMMgmt, command_givemoney) ||
command_add("gmzone", "[Zone ID|Zone Short Name] [Version] [Instance Identifier] - Zones to a private GM instance (Version defaults to 0 and Instance Identifier defaults to 'gmzone' if not used)", AccountStatus::GMAdmin, command_gmzone) ||
command_add("goto", "[playername] or [x y z] [h] - Teleport to the provided coordinates or to your target", AccountStatus::Steward, command_goto) ||
command_add("grantaa", "Grants a player all available AA points for their level.", AccountStatus::GMMgmt, command_grantaa) ||
command_add("grid", "[add/delete] [grid_num] [wandertype] [pausetype] - Create/delete a wandering grid", AccountStatus::GMAreas, command_grid) ||
command_add("guild", "Guild manipulation commands. Use argument help for more info.", AccountStatus::Steward, command_guild) ||
command_add("help", "[Search Criteria] - List available commands and their description, specify partial command as argument to search", AccountStatus::Player, command_help) ||
@@ -826,6 +827,7 @@ void command_bot(Client *c, const Seperator *sep)
#include "gm_commands/givemoney.cpp"
#include "gm_commands/gmzone.cpp"
#include "gm_commands/goto.cpp"
#include "gm_commands/grantaa.cpp"
#include "gm_commands/grid.cpp"
#include "gm_commands/guild.cpp"
#include "gm_commands/hp.cpp"
+1
View File
@@ -87,6 +87,7 @@ void command_giveitem(Client *c, const Seperator *sep);
void command_givemoney(Client *c, const Seperator *sep);
void command_gmzone(Client *c, const Seperator *sep);
void command_goto(Client *c, const Seperator *sep);
void command_grantaa(Client* c, const Seperator* sep);
void command_grid(Client *c, const Seperator *sep);
void command_guild(Client *c, const Seperator *sep);
void command_help(Client *c, const Seperator *sep);
+37 -16
View File
@@ -1836,27 +1836,16 @@ void PerlembParser::ExportEventVariables(
break;
}
case EVENT_DEATH_ZONE:
case EVENT_DEATH:
case EVENT_DEATH_COMPLETE: {
case EVENT_DEATH: {
Seperator sep(data);
ExportVar(package_name.c_str(), "killer_id", sep.arg[0]);
ExportVar(package_name.c_str(), "killer_damage", sep.arg[1]);
ExportVar(package_name.c_str(), "killer_spell", sep.arg[2]);
ExportVar(package_name.c_str(), "killer_skill", sep.arg[3]);
if (extra_pointers && extra_pointers->size() >= 1)
{
Corpse* corpse = std::any_cast<Corpse*>(extra_pointers->at(0));
if (corpse)
{
ExportVar(package_name.c_str(), "killed_corpse_id", corpse->GetID());
}
}
if (extra_pointers && extra_pointers->size() >= 2)
{
NPC* killed = std::any_cast<NPC*>(extra_pointers->at(1));
if (killed)
{
if (extra_pointers && extra_pointers->size() == 1) {
Mob* killed = std::any_cast<Mob*>(extra_pointers->at(0));
if (killed) {
ExportVar(package_name.c_str(), "killed_entity_id", killed->GetID());
ExportVar(package_name.c_str(), "killed_bot_id", killed->IsBot() ? killed->CastToBot()->GetBotID() : 0);
ExportVar(package_name.c_str(), "killed_npc_id", killed->IsNPC() ? killed->GetNPCTypeID() : 0);
@@ -1866,6 +1855,38 @@ void PerlembParser::ExportEventVariables(
ExportVar(package_name.c_str(), "killed_h", killed->GetHeading());
}
}
break;
}
case EVENT_DEATH_ZONE:
case EVENT_DEATH_COMPLETE: {
Seperator sep(data);
ExportVar(package_name.c_str(), "killer_id", sep.arg[0]);
ExportVar(package_name.c_str(), "killer_damage", sep.arg[1]);
ExportVar(package_name.c_str(), "killer_spell", sep.arg[2]);
ExportVar(package_name.c_str(), "killer_skill", sep.arg[3]);
if (extra_pointers && extra_pointers->size() >= 1) {
Corpse* corpse = std::any_cast<Corpse*>(extra_pointers->at(0));
if (corpse) {
ExportVar(package_name.c_str(), "killed_corpse_id", corpse->GetID());
}
}
if (extra_pointers && extra_pointers->size() >= 2) {
NPC* killed = std::any_cast<NPC*>(extra_pointers->at(1));
if (killed) {
ExportVar(package_name.c_str(), "killed_entity_id", killed->GetID());
ExportVar(package_name.c_str(), "killed_bot_id", killed->IsBot() ? killed->CastToBot()->GetBotID() : 0);
ExportVar(package_name.c_str(), "killed_npc_id", killed->IsNPC() ? killed->GetNPCTypeID() : 0);
ExportVar(package_name.c_str(), "killed_x", killed->GetX());
ExportVar(package_name.c_str(), "killed_y", killed->GetY());
ExportVar(package_name.c_str(), "killed_z", killed->GetZ());
ExportVar(package_name.c_str(), "killed_h", killed->GetHeading());
}
}
break;
}
+483 -49
View File
@@ -3481,78 +3481,488 @@ void Perl__crosszonemessageplayerbyname(const char* client_name, uint32 type, co
quest_manager.CrossZoneMessage(CZUpdateType_ClientName, update_identifier, type, message, client_name);
}
void Perl__crosszonemoveplayerbycharid(int character_id, const char* zone_short_name)
void Perl__crosszonemoveplayerbycharid(uint32 character_id, std::string zone_short_name)
{
uint16 instance_id = 0;
quest_manager.CrossZoneMove(CZUpdateType_Character, CZMoveUpdateSubtype_MoveZone, character_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbygroupid(int group_id, const char* zone_short_name)
void Perl__crosszonemoveplayerbycharid(uint32 character_id, std::string zone_short_name, float x, float y, float z)
{
uint16 instance_id = 0;
quest_manager.CrossZoneMove(CZUpdateType_Group, CZMoveUpdateSubtype_MoveZone, group_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyraidid(int raid_id, const char* zone_short_name)
void Perl__crosszonemoveplayerbycharid(
uint32 character_id,
std::string zone_short_name,
float x,
float y,
float z,
float heading
)
{
uint16 instance_id = 0;
quest_manager.CrossZoneMove(CZUpdateType_Raid, CZMoveUpdateSubtype_MoveZone, raid_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyguildid(int guild_id, const char* zone_short_name)
void Perl__crosszonemoveplayerbygroupid(uint32 group_id, std::string zone_short_name)
{
uint16 instance_id = 0;
quest_manager.CrossZoneMove(CZUpdateType_Guild, CZMoveUpdateSubtype_MoveZone, guild_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyexpeditionid(uint32 expedition_id, const char* zone_short_name)
void Perl__crosszonemoveplayerbygroupid(uint32 group_id, std::string zone_short_name, float x, float y, float z)
{
uint16 instance_id = 0;
quest_manager.CrossZoneMove(CZUpdateType_Expedition, CZMoveUpdateSubtype_MoveZone, expedition_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyname(const char* client_name, const char* zone_short_name)
void Perl__crosszonemoveplayerbygroupid(
uint32 group_id,
std::string zone_short_name,
float x,
float y,
float z,
float heading
)
{
int update_identifier = 0;
uint16 instance_id = 0;
quest_manager.CrossZoneMove(CZUpdateType_ClientName, CZMoveUpdateSubtype_MoveZone, update_identifier, zone_short_name, instance_id, client_name);
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveinstancebycharid(int character_id, uint16 instance_id)
void Perl__crosszonemoveplayerbyraidid(uint32 raid_id, std::string zone_short_name)
{
const char* zone_short_name = "";
quest_manager.CrossZoneMove(CZUpdateType_Character, CZMoveUpdateSubtype_MoveZoneInstance, character_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveinstancebygroupid(int group_id, uint16 instance_id)
void Perl__crosszonemoveplayerbyraidid(uint32 raid_id, std::string zone_short_name, float x, float y, float z)
{
const char* zone_short_name = "";
quest_manager.CrossZoneMove(CZUpdateType_Group, CZMoveUpdateSubtype_MoveZoneInstance, group_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveinstancebyraidid(int raid_id, uint16 instance_id)
void Perl__crosszonemoveplayerbyraidid(uint32 raid_id, std::string zone_short_name, float x, float y, float z, float heading)
{
const char* zone_short_name = "";
quest_manager.CrossZoneMove(CZUpdateType_Raid, CZMoveUpdateSubtype_MoveZoneInstance, raid_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveinstancebyguildid(int guild_id, uint16 instance_id)
void Perl__crosszonemoveplayerbyguildid(uint32 guild_id, std::string zone_short_name)
{
const char* zone_short_name = "";
quest_manager.CrossZoneMove(CZUpdateType_Guild, CZMoveUpdateSubtype_MoveZoneInstance, guild_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyguildid(uint32 guild_id, std::string zone_short_name, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyguildid(
uint32 guild_id,
std::string zone_short_name,
float x,
float y,
float z,
float heading
)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyexpeditionid(uint32 expedition_id, std::string zone_short_name)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyexpeditionid(uint32 expedition_id, std::string zone_short_name, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyexpeditionid(
uint32 expedition_id,
std::string zone_short_name,
float x,
float y,
float z,
float heading
)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyname(std::string client_name, std::string zone_short_name)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyname(std::string client_name, std::string zone_short_name, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveplayerbyname(std::string client_name, std::string zone_short_name, float x, float y, float z, float heading)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, heading),
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void Perl__crosszonemoveinstancebycharid(uint32 character_id, uint16 instance_id)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebycharid(uint32 character_id, uint16 instance_id, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebycharid(uint32 character_id, uint16 instance_id, float x, float y, float z, float heading)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebygroupid(uint32 group_id, uint16 instance_id)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebygroupid(uint32 group_id, uint16 instance_id, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebygroupid(uint32 group_id, uint16 instance_id, float x, float y, float z, float heading)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyraidid(uint32 raid_id, uint16 instance_id)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyraidid(uint32 raid_id, uint16 instance_id, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyraidid(uint32 raid_id, uint16 instance_id, float x, float y, float z, float heading)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyguildid(uint32 guild_id, uint16 instance_id)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyguildid(uint32 guild_id, uint16 instance_id, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyguildid(uint32 guild_id, uint16 instance_id, float x, float y, float z, float heading)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyexpeditionid(uint32 expedition_id, uint16 instance_id)
{
const char* zone_short_name = "";
quest_manager.CrossZoneMove(CZUpdateType_Expedition, CZMoveUpdateSubtype_MoveZoneInstance, expedition_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyclientname(const char* client_name, uint16 instance_id)
void Perl__crosszonemoveinstancebyexpeditionid(uint32 expedition_id, uint16 instance_id, float x, float y, float z)
{
int update_identifier = 0;
const char* zone_short_name = "";
quest_manager.CrossZoneMove(CZUpdateType_ClientName, CZMoveUpdateSubtype_MoveZoneInstance, update_identifier, zone_short_name, instance_id, client_name);
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyexpeditionid(uint32 expedition_id, uint16 instance_id, float x, float y, float z, float heading)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyclientname(std::string client_name, uint16 instance_id)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.instance_id = instance_id,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyclientname(std::string client_name, uint16 instance_id, float x, float y, float z)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszonemoveinstancebyclientname(std::string client_name, uint16 instance_id, float x, float y, float z, float heading)
{
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void Perl__crosszoneremoveldonlossbycharid(int character_id, uint32 theme_id)
@@ -5762,18 +6172,42 @@ void perl_register_quest()
package.add("crosszonemessageplayerbyguildid", &Perl__crosszonemessageplayerbyguildid);
package.add("crosszonemessageplayerbyexpeditionid", &Perl__crosszonemessageplayerbyexpeditionid);
package.add("crosszonemessageplayerbyname", &Perl__crosszonemessageplayerbyname);
package.add("crosszonemoveplayerbycharid", &Perl__crosszonemoveplayerbycharid);
package.add("crosszonemoveplayerbygroupid", &Perl__crosszonemoveplayerbygroupid);
package.add("crosszonemoveplayerbyraidid", &Perl__crosszonemoveplayerbyraidid);
package.add("crosszonemoveplayerbyguildid", &Perl__crosszonemoveplayerbyguildid);
package.add("crosszonemoveplayerbyexpeditionid", &Perl__crosszonemoveplayerbyexpeditionid);
package.add("crosszonemoveplayerbyname", &Perl__crosszonemoveplayerbyname);
package.add("crosszonemoveinstancebycharid", &Perl__crosszonemoveinstancebycharid);
package.add("crosszonemoveinstancebygroupid", &Perl__crosszonemoveinstancebygroupid);
package.add("crosszonemoveinstancebyraidid", &Perl__crosszonemoveinstancebyraidid);
package.add("crosszonemoveinstancebyguildid", &Perl__crosszonemoveinstancebyguildid);
package.add("crosszonemoveinstancebyexpeditionid", &Perl__crosszonemoveinstancebyexpeditionid);
package.add("crosszonemoveinstancebyclientname", &Perl__crosszonemoveinstancebyclientname);
package.add("crosszonemoveplayerbycharid", (void(*)(uint32, std::string))&Perl__crosszonemoveplayerbycharid);
package.add("crosszonemoveplayerbycharid", (void(*)(uint32, std::string, float, float, float))&Perl__crosszonemoveplayerbycharid);
package.add("crosszonemoveplayerbycharid", (void(*)(uint32, std::string, float, float, float, float))&Perl__crosszonemoveplayerbycharid);
package.add("crosszonemoveplayerbygroupid", (void(*)(uint32, std::string))&Perl__crosszonemoveplayerbygroupid);
package.add("crosszonemoveplayerbygroupid", (void(*)(uint32, std::string, float, float, float))&Perl__crosszonemoveplayerbygroupid);
package.add("crosszonemoveplayerbygroupid", (void(*)(uint32, std::string, float, float, float, float))&Perl__crosszonemoveplayerbygroupid);
package.add("crosszonemoveplayerbyraidid", (void(*)(uint32, std::string))&Perl__crosszonemoveplayerbyraidid);
package.add("crosszonemoveplayerbyraidid", (void(*)(uint32, std::string, float, float, float))&Perl__crosszonemoveplayerbyraidid);
package.add("crosszonemoveplayerbyraidid", (void(*)(uint32, std::string, float, float, float, float))&Perl__crosszonemoveplayerbyraidid);
package.add("crosszonemoveplayerbyguildid", (void(*)(uint32, std::string))&Perl__crosszonemoveplayerbyguildid);
package.add("crosszonemoveplayerbyguildid", (void(*)(uint32, std::string, float, float, float))&Perl__crosszonemoveplayerbyguildid);
package.add("crosszonemoveplayerbyguildid", (void(*)(uint32, std::string, float, float, float, float))&Perl__crosszonemoveplayerbyguildid);
package.add("crosszonemoveplayerbyexpeditionid", (void(*)(uint32, std::string))&Perl__crosszonemoveplayerbyexpeditionid);
package.add("crosszonemoveplayerbyexpeditionid", (void(*)(uint32, std::string, float, float, float))&Perl__crosszonemoveplayerbyexpeditionid);
package.add("crosszonemoveplayerbyexpeditionid", (void(*)(uint32, std::string, float, float, float, float))&Perl__crosszonemoveplayerbyexpeditionid);
package.add("crosszonemoveplayerbyname", (void(*)(std::string, std::string))&Perl__crosszonemoveplayerbyname);
package.add("crosszonemoveplayerbyname", (void(*)(std::string, std::string, float, float, float))&Perl__crosszonemoveplayerbyname);
package.add("crosszonemoveplayerbyname", (void(*)(std::string, std::string, float, float, float, float))&Perl__crosszonemoveplayerbyname);
package.add("crosszonemoveinstancebycharid", (void(*)(uint32, uint16))&Perl__crosszonemoveinstancebycharid);
package.add("crosszonemoveinstancebycharid", (void(*)(uint32, uint16, float, float, float))&Perl__crosszonemoveinstancebycharid);
package.add("crosszonemoveinstancebycharid", (void(*)(uint32, uint16, float, float, float, float))&Perl__crosszonemoveinstancebycharid);
package.add("crosszonemoveinstancebygroupid", (void(*)(uint32, uint16))&Perl__crosszonemoveinstancebygroupid);
package.add("crosszonemoveinstancebygroupid", (void(*)(uint32, uint16, float, float, float))&Perl__crosszonemoveinstancebygroupid);
package.add("crosszonemoveinstancebygroupid", (void(*)(uint32, uint16, float, float, float, float))&Perl__crosszonemoveinstancebygroupid);
package.add("crosszonemoveinstancebyraidid", (void(*)(uint32, uint16))&Perl__crosszonemoveinstancebyraidid);
package.add("crosszonemoveinstancebyraidid", (void(*)(uint32, uint16, float, float, float))&Perl__crosszonemoveinstancebyraidid);
package.add("crosszonemoveinstancebyraidid", (void(*)(uint32, uint16, float, float, float, float))&Perl__crosszonemoveinstancebyraidid);
package.add("crosszonemoveinstancebyguildid", (void(*)(uint32, uint16))&Perl__crosszonemoveinstancebyguildid);
package.add("crosszonemoveinstancebyguildid", (void(*)(uint32, uint16, float, float, float))&Perl__crosszonemoveinstancebyguildid);
package.add("crosszonemoveinstancebyguildid", (void(*)(uint32, uint16, float, float, float, float))&Perl__crosszonemoveinstancebyguildid);
package.add("crosszonemoveinstancebyexpeditionid", (void(*)(uint32, uint16))&Perl__crosszonemoveinstancebyexpeditionid);
package.add("crosszonemoveinstancebyexpeditionid", (void(*)(uint32, uint16, float, float, float))&Perl__crosszonemoveinstancebyexpeditionid);
package.add("crosszonemoveinstancebyexpeditionid", (void(*)(uint32, uint16, float, float, float, float))&Perl__crosszonemoveinstancebyexpeditionid);
package.add("crosszonemoveinstancebyclientname", (void(*)(std::string, uint16))&Perl__crosszonemoveinstancebyclientname);
package.add("crosszonemoveinstancebyclientname", (void(*)(std::string, uint16, float, float, float))&Perl__crosszonemoveinstancebyclientname);
package.add("crosszonemoveinstancebyclientname", (void(*)(std::string, uint16, float, float, float, float))&Perl__crosszonemoveinstancebyclientname);
package.add("crosszoneremoveldonlossbycharid", &Perl__crosszoneremoveldonlossbycharid);
package.add("crosszoneremoveldonlossbygroupid", &Perl__crosszoneremoveldonlossbygroupid);
package.add("crosszoneremoveldonlossbyraidid", &Perl__crosszoneremoveldonlossbyraidid);
+4
View File
@@ -5652,6 +5652,10 @@ void EntityList::SendAlternateAdvancementStats() {
for (auto &c : client_list) {
c.second->Message(Chat::White, "Reloading AA");
c.second->ReloadExpansionProfileSetting();
if (!database.LoadAlternateAdvancement(c.second)) {
c.second->Message(Chat::Red, "Error loading alternate advancement character data");
}
c.second->SendClearPlayerAA();
c.second->SendAlternateAdvancementTable();
c.second->SendAlternateAdvancementStats();
+2
View File
@@ -938,6 +938,8 @@ void Client::SetLevel(uint8 set_level, bool command)
m_pp.exp = GetEXPForLevel(set_level);
Message(Chat::Yellow, fmt::format("Welcome to level {}!", set_level).c_str());
lu->exp = 0;
AutoGrantAAPoints();
} else {
const auto temporary_xp = (
static_cast<float>(m_pp.exp - GetEXPForLevel(GetLevel())) /
+41 -47
View File
@@ -7,58 +7,52 @@ void command_castspell(Client *c, const Seperator *sep)
return;
}
Mob *target = c;
if (c->GetTarget()) {
target = c->GetTarget();
}
if (!sep->IsNumber(1)) {
const auto arguments = sep->argnum;
if (!arguments || !sep->IsNumber(1)) {
c->Message(
Chat::White,
"Usage: #castspell [Spell ID] [Instant (0 = False, 1 = True, Default is 1 if Unused)]"
);
return;
}
else {
uint16 spell_id = Strings::ToUnsignedInt(sep->arg[1]);
if (IsCastRestrictedSpell(spell_id) && c->Admin() < commandCastSpecials) {
c->Message(Chat::Red, "Unable to cast spell.");
}
else if (spell_id >= SPDAT_RECORDS) {
c->Message(Chat::White, "Invalid Spell ID.");
}
else {
bool instant_cast = (c->Admin() >= commandInstacast ? true : false);
if (instant_cast && sep->IsNumber(2)) {
instant_cast = Strings::ToInt(sep->arg[2]) ? true : false;
c->Message(Chat::White, fmt::format("{}", Strings::ToInt(sep->arg[2])).c_str());
}
if (c->Admin() >= commandInstacast && instant_cast) {
c->SpellFinished(
spell_id,
target,
EQ::spells::CastingSlot::Item,
0,
-1,
spells[spell_id].resist_difficulty
);
}
else {
c->CastSpell(spell_id, target->GetID(), EQ::spells::CastingSlot::Item, spells[spell_id].cast_time);
}
c->Message(
Chat::White,
fmt::format(
"Cast {} ({}) on {}{}.",
GetSpellName(spell_id),
spell_id,
c->GetTargetDescription(target),
instant_cast ? " instantly" : ""
).c_str()
);
}
Mob* t = c;
if (c->GetTarget()) {
t = c->GetTarget();
}
const uint16 spell_id = Strings::ToUnsignedInt(sep->arg[1]);
if (IsCastRestrictedSpell(spell_id) && c->Admin() < commandCastSpecials) {
c->Message(Chat::White, "Unable to cast spell.");
return;
} else if (spell_id >= SPDAT_RECORDS) {
c->Message(Chat::White, "Invalid Spell ID.");
return;
}
const bool can_instant_cast = c->Admin() >= commandInstacast;
bool instant_cast = false;
if (can_instant_cast && sep->IsNumber(2)) {
instant_cast = Strings::ToBool(sep->arg[2]);
}
const uint16 target_id = t->GetID();
if (instant_cast) {
c->SpellFinished(spell_id, t);
} else {
c->CastSpell(spell_id, t->GetID(), EQ::spells::CastingSlot::Item, spells[spell_id].cast_time);
}
c->Message(
Chat::White,
fmt::format(
"Cast {} ({}) on {}{}.",
GetSpellName(spell_id),
spell_id,
c->GetTargetDescription(t, TargetDescriptionType::LCSelf, target_id),
instant_cast ? " instantly" : ""
).c_str()
);
}
+20
View File
@@ -0,0 +1,20 @@
#include "../client.h"
void command_grantaa(Client *c, const Seperator *sep)
{
if (!c->GetTarget() || !c->GetTarget()->IsClient()) {
c->Message(Chat::White, "You must target a player to use this command.");
return;
}
auto t = c->GetTarget()->CastToClient();
t->GrantAllAAPoints();
c->Message(
Chat::White,
fmt::format(
"Successfully granted all Alternate Advancements for {}.",
c->GetTargetDescription(t)
).c_str()
);
}
+26 -17
View File
@@ -339,24 +339,33 @@ void command_npcedit(Client *c, const Seperator *sep)
}
} else if (!strcasecmp(sep->arg[1], "faction")) {
if (sep->IsNumber(2)) {
auto faction_id = Strings::ToInt(sep->arg[2]);
auto faction_name = content_db.GetFactionName(faction_id);
n.npc_faction_id = faction_id;
d = fmt::format(
"{} is now using Faction {}.",
npc_id_string,
(
!faction_name.empty() ?
fmt::format(
"{} ({})",
faction_name,
faction_id
) :
Strings::Commify(sep->arg[2])
)
);
auto npc_faction_id = Strings::ToInt(sep->arg[2]);
const NPCFactionList* cf = content_db.GetNPCFactionEntry(npc_faction_id);
if (cf) {
auto faction_id = cf->primaryfaction;
auto faction_name = content_db.GetFactionName(faction_id);
n.npc_faction_id = npc_faction_id;
d = fmt::format(
"{} is now using Faction {}.",
npc_id_string,
(
!faction_name.empty() ?
fmt::format(
"{} ({})",
faction_name,
faction_id
) :
Strings::Commify(sep->arg[2])
)
);
}
else {
c->Message(Chat::White, "Need to provide a valid, existing, npc_faction_id");
return;
}
} else {
c->Message(Chat::White, "Usage: #npcedit faction [Faction ID] - Sets an NPC's Faction ID");
c->Message(Chat::White, "Usage: #npcedit faction [npc_faction_id] - Sets an NPC's npc Faction ID (not primary faction) but lookup into table.");
return;
}
} else if (!strcasecmp(sep->arg[1], "adventure_template_id")) {
+63 -61
View File
@@ -9,7 +9,7 @@
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
@@ -113,89 +113,91 @@ Group::~Group()
}
//Split money used in OP_Split (/split and /autosplit).
void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter) {
//avoid unneeded work
if (
!copper &&
!silver &&
!gold &&
!platinum
) {
void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter)
{
// Return early if no money to split.
if (!copper && !silver && !gold && !platinum) {
return;
}
uint8 member_count = 0;
// splitter can not be nullptr
if (!splitter) {
return;
}
// find number of clients in group and check if splitter is in group
uint8 member_count = 0;
bool splitter_in_group = false;
for (uint32 i = 0; i < MAX_GROUP_MEMBERS; i++) {
// Don't split with Mercs or Bots
if (members[i] && members[i]->IsClient()) {
member_count++;
if (members[i]->CastToClient() == splitter) {
splitter_in_group = true;
}
}
}
// Return if no group members found.
if (!member_count) {
return;
}
uint32 modifier;
if (member_count > 1) {
modifier = platinum % member_count;
if (modifier) {
platinum -= modifier;
gold += 10 * modifier;
}
modifier = gold % member_count;
if (modifier) {
gold -= modifier;
silver += 10 * modifier;
}
modifier = silver % member_count;
if (modifier) {
silver -= modifier;
copper += 10 * modifier;
}
// Splitter must be in group
if (!splitter_in_group) {
return;
}
auto copper_split = copper / member_count;
auto silver_split = silver / member_count;
auto gold_split = gold / member_count;
auto platinum_split = platinum / member_count;
// Calculate split and remainder for each coin type
uint32 copper_split = copper / member_count;
uint32 copper_remainder = copper % member_count;
uint32 silver_split = silver / member_count;
uint32 silver_remainder = silver % member_count;
uint32 gold_split = gold / member_count;
uint32 gold_remainder = gold % member_count;
uint32 platinum_split = platinum / member_count;
uint32 platinum_remainder = platinum % member_count;
for (uint32 i = 0; i < MAX_GROUP_MEMBERS; i++) {
if (members[i] && members[i]->IsClient()) { // If Group Member is Client
members[i]->CastToClient()->AddMoneyToPP(
copper_split,
silver_split,
gold_split,
platinum_split,
true
);
// Loop through the group members to split the coins.
for (const auto &m: members) {
if (m && m->IsClient()) {
Client *member_client = m->CastToClient();
if (player_event_logs.IsEventEnabled(PlayerEvent::SPLIT_MONEY)) {
auto e = PlayerEvent::SplitMoneyEvent{
.copper = copper_split,
.silver = silver_split,
.gold = gold_split,
.platinum = platinum_split,
.player_money_balance = members[i]->CastToClient()->GetCarriedMoney(),
};
uint32 receive_copper = copper_split;
uint32 receive_silver = silver_split;
uint32 receive_gold = gold_split;
uint32 receive_platinum = platinum_split;
RecordPlayerEventLogWithClient(members[i]->CastToClient(), PlayerEvent::SPLIT_MONEY, e);
// splitter gets the remainders of coin
if (member_client == splitter) {
receive_copper += copper_remainder;
receive_silver += silver_remainder;
receive_gold += gold_remainder;
receive_platinum += platinum_remainder;
}
members[i]->CastToClient()->MessageString(
// Add the coins to the player's purse.
member_client->AddMoneyToPP(receive_copper, receive_silver, receive_gold, receive_platinum, true);
// If logging of player money transactions is enabled, record the transaction.
if (player_event_logs.IsEventEnabled(PlayerEvent::SPLIT_MONEY)) {
auto e = PlayerEvent::SplitMoneyEvent{
.copper = receive_copper,
.silver = receive_silver,
.gold = receive_gold,
.platinum = receive_platinum,
.player_money_balance = member_client->GetCarriedMoney(),
};
RecordPlayerEventLogWithClient(member_client, PlayerEvent::SPLIT_MONEY, e);
}
// Notify the player of their received coins.
member_client->MessageString(
Chat::MoneySplit,
YOU_RECEIVE_AS_SPLIT,
Strings::Money(
platinum_split,
gold_split,
silver_split,
copper_split
).c_str()
Strings::Money(receive_platinum, receive_gold, receive_silver, receive_copper).c_str()
);
}
}
+70 -32
View File
@@ -155,44 +155,58 @@ void Lua_Bot::ApplySpell(int spell_id, int duration) {
self->ApplySpell(spell_id, duration);
}
void Lua_Bot::ApplySpell(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::ApplySpell(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo);
}
void Lua_Bot::ApplySpell(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Bot::ApplySpellGroup(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Bot::ApplySpellGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Bot::ApplySpellGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Bot::ApplySpellGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Bot::ApplySpellRaid(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, true, true);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid, true, true);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, true);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, true, true);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, true);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Lua_Bot::SetSpellDuration(int spell_id) {
@@ -205,44 +219,59 @@ void Lua_Bot::SetSpellDuration(int spell_id, int duration) {
self->SetSpellDuration(spell_id, duration);
}
void Lua_Bot::SetSpellDuration(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::SetSpellDuration(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration, level);
}
void Lua_Bot::SetSpellDuration(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Raid);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
int Lua_Bot::CountAugmentEquippedByID(uint32 item_id) {
@@ -555,14 +584,20 @@ luabind::scope lua_register_bot() {
.def("AddItem", (void(Lua_Bot::*)(luabind::adl::object))&Lua_Bot::AddItem)
.def("ApplySpell", (void(Lua_Bot::*)(int))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpell)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,bool,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int,bool,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int,bool,bool))&Lua_Bot::ApplySpellRaid)
.def("Camp", (void(Lua_Bot::*)(void))&Lua_Bot::Camp)
.def("Camp", (void(Lua_Bot::*)(bool))&Lua_Bot::Camp)
.def("CountBotItem", (uint32(Lua_Bot::*)(uint32))&Lua_Bot::CountBotItem)
@@ -622,14 +657,17 @@ luabind::scope lua_register_bot() {
.def("SetExpansionBitmask", (void(Lua_Bot::*)(int,bool))&Lua_Bot::SetExpansionBitmask)
.def("SetSpellDuration", (void(Lua_Bot::*)(int))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::SetSpellDuration)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,bool,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,int,bool,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SendPayload", (void(Lua_Bot::*)(int))&Lua_Bot::SendPayload)
.def("SendPayload", (void(Lua_Bot::*)(int,std::string))&Lua_Bot::SendPayload)
.def("Signal", (void(Lua_Bot::*)(int))&Lua_Bot::Signal)
+14 -8
View File
@@ -77,29 +77,35 @@ public:
void ApplySpell(int spell_id);
void ApplySpell(int spell_id, int duration);
void ApplySpell(int spell_id, int duration, bool allow_pets);
void ApplySpell(int spell_id, int duration, int level);
void ApplySpell(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellGroup(int spell_id);
void ApplySpellGroup(int spell_id, int duration);
void ApplySpellGroup(int spell_id, int duration, bool allow_pets);
void ApplySpellGroup(int spell_id, int duration, int level);
void ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellRaid(int spell_id);
void ApplySpellRaid(int spell_id, int duration);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void ApplySpellRaid(int spell_id, int duration, int level);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
void SetSpellDuration(int spell_id);
void SetSpellDuration(int spell_id, int duration);
void SetSpellDuration(int spell_id, int duration, bool allow_pets);
void SetSpellDuration(int spell_id, int duration, int level);
void SetSpellDuration(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationGroup(int spell_id);
void SetSpellDurationGroup(int spell_id, int duration);
void SetSpellDurationGroup(int spell_id, int duration, bool allow_pets);
void SetSpellDurationGroup(int spell_id, int duration, int level);
void SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationRaid(int spell_id);
void SetSpellDurationRaid(int spell_id, int duration);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void SetSpellDurationRaid(int spell_id, int duration, int level);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
int CountAugmentEquippedByID(uint32 item_id);
int CountItemEquippedByID(uint32 item_id);
+86 -50
View File
@@ -2716,59 +2716,74 @@ void Lua_Client::ApplySpell(int spell_id, int duration) {
self->ApplySpell(spell_id, duration);
}
void Lua_Client::ApplySpell(int spell_id, int duration, bool allow_pets) {
void Lua_Client::ApplySpell(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level);
}
void Lua_Client::ApplySpell(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::ApplySpell(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Client::ApplySpell(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Lua_Client::ApplySpellGroup(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Client::ApplySpellGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Lua_Client::ApplySpellRaid(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
}
void Lua_Client::SetSpellDuration(int spell_id) {
@@ -2781,59 +2796,74 @@ void Lua_Client::SetSpellDuration(int spell_id, int duration) {
self->SetSpellDuration(spell_id, duration);
}
void Lua_Client::SetSpellDuration(int spell_id, int duration, bool allow_pets) {
void Lua_Client::SetSpellDuration(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration, level);
}
void Lua_Client::SetSpellDuration(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::SetSpellDuration(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Client::SetSpellDuration(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Lua_Client::SetSpellDurationGroup(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Lua_Client::SetSpellDurationRaid(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Raid);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets, is_raid_group_only, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets, is_raid_group_only, allow_bots);
}
void Lua_Client::UpdateAdmin() {
@@ -3164,17 +3194,20 @@ luabind::scope lua_register_client() {
.def("Admin", (int16(Lua_Client::*)(void))&Lua_Client::Admin)
.def("ApplySpell", (void(Lua_Client::*)(int))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,bool))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,int))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::ApplySpell)
.def("ApplySpellGroup", (void(Lua_Client::*)(int))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,int))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellRaid", (void(Lua_Client::*)(int))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,bool,bool,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int,bool,bool,bool))&Lua_Client::ApplySpellRaid)
.def("AssignTask", (void(Lua_Client::*)(int))&Lua_Client::AssignTask)
.def("AssignTask", (void(Lua_Client::*)(int,int))&Lua_Client::AssignTask)
.def("AssignTask", (void(Lua_Client::*)(int,int,bool))&Lua_Client::AssignTask)
@@ -3595,17 +3628,20 @@ luabind::scope lua_register_client() {
.def("SetSkillPoints", (void(Lua_Client::*)(int))&Lua_Client::SetSkillPoints)
.def("SetSpellDuration", (void(Lua_Client::*)(int))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,int))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,int))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,bool,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int,bool,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetStartZone", (void(Lua_Client::*)(int))&Lua_Client::SetStartZone)
.def("SetStartZone", (void(Lua_Client::*)(int,float))&Lua_Client::SetStartZone)
.def("SetStartZone", (void(Lua_Client::*)(int,float,float))&Lua_Client::SetStartZone)
+20 -14
View File
@@ -483,35 +483,41 @@ public:
void ApplySpell(int spell_id);
void ApplySpell(int spell_id, int duration);
void ApplySpell(int spell_id, int duration, bool allow_pets);
void ApplySpell(int spell_id, int duration, bool allow_pets, bool allow_bots);
void ApplySpell(int spell_id, int duration, int level);
void ApplySpell(int spell_id, int duration, int level, bool allow_pets);
void ApplySpell(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void ApplySpellGroup(int spell_id);
void ApplySpellGroup(int spell_id, int duration);
void ApplySpellGroup(int spell_id, int duration, bool allow_pets);
void ApplySpellGroup(int spell_id, int duration, bool allow_pets, bool allow_bots);
void ApplySpellGroup(int spell_id, int duration, int level);
void ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void ApplySpellRaid(int spell_id);
void ApplySpellRaid(int spell_id, int duration);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots);
void ApplySpellRaid(int spell_id, int duration, int level);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots);
void SetSpellDuration(int spell_id);
void SetSpellDuration(int spell_id, int duration);
void SetSpellDuration(int spell_id, int duration, bool allow_pets);
void SetSpellDuration(int spell_id, int duration, bool allow_pets, bool allow_bots);
void SetSpellDuration(int spell_id, int duration, int level);
void SetSpellDuration(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDuration(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void SetSpellDurationGroup(int spell_id);
void SetSpellDurationGroup(int spell_id, int duration);
void SetSpellDurationGroup(int spell_id, int duration, bool allow_pets);
void SetSpellDurationGroup(int spell_id, int duration, bool allow_pets, bool allow_bots);
void SetSpellDurationGroup(int spell_id, int duration, int level);
void SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void SetSpellDurationRaid(int spell_id);
void SetSpellDurationRaid(int spell_id, int duration);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots);
void SetSpellDurationRaid(int spell_id, int duration, int level);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots);
int GetEnvironmentDamageModifier();
+431 -73
View File
@@ -2539,90 +2539,424 @@ void lua_cross_zone_message_player_by_name(uint32 type, const char* client_name,
quest_manager.CrossZoneMessage(update_type, update_identifier, type, message, client_name);
}
void lua_cross_zone_move_player_by_char_id(int character_id, const char* zone_short_name) {
uint8 update_type = CZUpdateType_Character;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZone;
uint16 instance_id = 0;
quest_manager.CrossZoneMove(update_type, update_subtype, character_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_char_id(uint32 character_id, std::string zone_short_name) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_group_id(int group_id, const char* zone_short_name) {
uint8 update_type = CZUpdateType_Group;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZone;
uint16 instance_id = 0;
quest_manager.CrossZoneMove(update_type, update_subtype, group_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_char_id(uint32 character_id, std::string zone_short_name, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_raid_id(int raid_id, const char* zone_short_name) {
uint8 update_type = CZUpdateType_Raid;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZone;
uint16 instance_id = 0;
quest_manager.CrossZoneMove(update_type, update_subtype, raid_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_char_id(uint32 character_id, std::string zone_short_name, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_guild_id(int guild_id, const char* zone_short_name) {
uint8 update_type = CZUpdateType_Guild;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZone;
uint16 instance_id = 0;
quest_manager.CrossZoneMove(update_type, update_subtype, guild_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_group_id(uint32 group_id, std::string zone_short_name) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_expedition_id(int expedition_id, const char* zone_short_name) {
uint8 update_type = CZUpdateType_Expedition;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZone;
uint16 instance_id = 0;
quest_manager.CrossZoneMove(update_type, update_subtype, expedition_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_group_id(uint32 group_id, std::string zone_short_name, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_client_name(const char* client_name, const char* zone_short_name) {
uint8 update_type = CZUpdateType_Character;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZone;
int update_identifier = 0;
uint16 instance_id = 0;
quest_manager.CrossZoneMove(update_type, update_subtype, update_identifier, zone_short_name, instance_id, client_name);
void lua_cross_zone_move_player_by_group_id(uint32 group_id, std::string zone_short_name, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_instance_by_char_id(int character_id, uint16 instance_id) {
uint8 update_type = CZUpdateType_Character;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance;
const char* zone_short_name = "";
quest_manager.CrossZoneMove(update_type, update_subtype, character_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_raid_id(uint32 raid_id, std::string zone_short_name) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_instance_by_group_id(int group_id, uint16 instance_id) {
uint8 update_type = CZUpdateType_Group;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance;
const char* zone_short_name = "";
quest_manager.CrossZoneMove(update_type, update_subtype, group_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_raid_id(uint32 raid_id, std::string zone_short_name, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_instance_by_raid_id(int raid_id, uint16 instance_id) {
uint8 update_type = CZUpdateType_Raid;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance;
const char* zone_short_name = "";
quest_manager.CrossZoneMove(update_type, update_subtype, raid_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_raid_id(uint32 raid_id, std::string zone_short_name, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_instance_by_guild_id(int guild_id, uint16 instance_id) {
uint8 update_type = CZUpdateType_Guild;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance;
const char* zone_short_name = "";
quest_manager.CrossZoneMove(update_type, update_subtype, guild_id, zone_short_name, instance_id);
void lua_cross_zone_move_player_by_guild_id(uint32 guild_id, std::string zone_short_name) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_guild_id(uint32 guild_id, std::string zone_short_name, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_guild_id(uint32 guild_id, std::string zone_short_name, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_expedition_id(uint32 expedition_id, std::string zone_short_name) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_expedition_id(uint32 expedition_id, std::string zone_short_name, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_expedition_id(uint32 expedition_id, std::string zone_short_name, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_client_name(std::string client_name, std::string zone_short_name) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_client_name(std::string client_name, std::string zone_short_name, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, 0.0f),
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_player_by_client_name(std::string client_name, std::string zone_short_name, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, heading),
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZone,
.zone_short_name = zone_short_name,
}
);
}
void lua_cross_zone_move_instance_by_char_id(uint32 character_id, uint16 instance_id) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_char_id(uint32 character_id, uint16 instance_id, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_char_id(uint32 character_id, uint16 instance_id, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = character_id,
.update_type = CZUpdateType_Character,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_group_id(uint32 group_id, uint16 instance_id) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_group_id(uint32 group_id, uint16 instance_id, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_group_id(uint32 group_id, uint16 instance_id, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = group_id,
.update_type = CZUpdateType_Group,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_raid_id(uint32 raid_id, uint16 instance_id) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_raid_id(uint32 raid_id, uint16 instance_id, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_raid_id(uint32 raid_id, uint16 instance_id, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = raid_id,
.update_type = CZUpdateType_Raid,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_guild_id(uint32 guild_id, uint16 instance_id) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_guild_id(uint32 guild_id, uint16 instance_id, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_guild_id(uint32 guild_id, uint16 instance_id, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = guild_id,
.update_type = CZUpdateType_Guild,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_expedition_id(uint32 expedition_id, uint16 instance_id) {
uint8 update_type = CZUpdateType_Expedition;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance;
const char* zone_short_name = "";
quest_manager.CrossZoneMove(update_type, update_subtype, expedition_id, zone_short_name, instance_id);
quest_manager.CrossZoneMove(
CZMove_Struct{
.instance_id = instance_id,
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_client_name(const char* client_name, uint16 instance_id) {
uint8 update_type = CZUpdateType_ClientName;
uint8 update_subtype = CZMoveUpdateSubtype_MoveZoneInstance;
int update_identifier = 0;
const char* zone_short_name = "";
quest_manager.CrossZoneMove(update_type, update_subtype, update_identifier, zone_short_name, instance_id, client_name);
void lua_cross_zone_move_instance_by_expedition_id(uint32 expedition_id, uint16 instance_id, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_expedition_id(uint32 expedition_id, uint16 instance_id, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_identifier = expedition_id,
.update_type = CZUpdateType_Expedition,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_client_name(std::string client_name, uint16 instance_id) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.instance_id = instance_id,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_client_name(std::string client_name, uint16 instance_id, float x, float y, float z) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, 0.0f),
.instance_id = instance_id,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_move_instance_by_client_name(std::string client_name, uint16 instance_id, float x, float y, float z, float heading) {
quest_manager.CrossZoneMove(
CZMove_Struct{
.client_name = client_name,
.coordinates = glm::vec4(x, y, z, heading),
.instance_id = instance_id,
.update_type = CZUpdateType_ClientName,
.update_subtype = CZMoveUpdateSubtype_MoveZoneInstance,
}
);
}
void lua_cross_zone_remove_ldon_loss_by_char_id(int character_id, uint32 theme_id) {
@@ -5890,18 +6224,42 @@ luabind::scope lua_register_general() {
luabind::def("cross_zone_message_player_by_guild_id", &lua_cross_zone_message_player_by_guild_id),
luabind::def("cross_zone_message_player_by_expedition_id", &lua_cross_zone_message_player_by_expedition_id),
luabind::def("cross_zone_message_player_by_name", &lua_cross_zone_message_player_by_name),
luabind::def("cross_zone_move_player_by_char_id", &lua_cross_zone_move_player_by_char_id),
luabind::def("cross_zone_move_player_by_group_id", &lua_cross_zone_move_player_by_group_id),
luabind::def("cross_zone_move_player_by_raid_id", &lua_cross_zone_move_player_by_raid_id),
luabind::def("cross_zone_move_player_by_guild_id", &lua_cross_zone_move_player_by_guild_id),
luabind::def("cross_zone_move_player_by_expedition_id", &lua_cross_zone_move_player_by_expedition_id),
luabind::def("cross_zone_move_player_by_client_name", &lua_cross_zone_move_player_by_client_name),
luabind::def("cross_zone_move_instance_by_char_id", &lua_cross_zone_move_instance_by_char_id),
luabind::def("cross_zone_move_instance_by_group_id", &lua_cross_zone_move_instance_by_group_id),
luabind::def("cross_zone_move_instance_by_raid_id", &lua_cross_zone_move_instance_by_raid_id),
luabind::def("cross_zone_move_instance_by_guild_id", &lua_cross_zone_move_instance_by_guild_id),
luabind::def("cross_zone_move_instance_by_expedition_id", &lua_cross_zone_move_instance_by_expedition_id),
luabind::def("cross_zone_move_instance_by_client_name", &lua_cross_zone_move_instance_by_client_name),
luabind::def("cross_zone_move_player_by_char_id", (void(*)(uint32,std::string))&lua_cross_zone_move_player_by_char_id),
luabind::def("cross_zone_move_player_by_char_id", (void(*)(uint32,std::string,float,float,float))&lua_cross_zone_move_player_by_char_id),
luabind::def("cross_zone_move_player_by_char_id", (void(*)(uint32,std::string,float,float,float,float))&lua_cross_zone_move_player_by_char_id),
luabind::def("cross_zone_move_player_by_group_id", (void(*)(uint32,std::string))&lua_cross_zone_move_player_by_group_id),
luabind::def("cross_zone_move_player_by_group_id", (void(*)(uint32,std::string,float,float,float))&lua_cross_zone_move_player_by_group_id),
luabind::def("cross_zone_move_player_by_group_id", (void(*)(uint32,std::string,float,float,float,float))&lua_cross_zone_move_player_by_group_id),
luabind::def("cross_zone_move_player_by_raid_id", (void(*)(uint32,std::string))&lua_cross_zone_move_player_by_raid_id),
luabind::def("cross_zone_move_player_by_raid_id", (void(*)(uint32,std::string,float,float,float))&lua_cross_zone_move_player_by_raid_id),
luabind::def("cross_zone_move_player_by_raid_id", (void(*)(uint32,std::string,float,float,float,float))&lua_cross_zone_move_player_by_raid_id),
luabind::def("cross_zone_move_player_by_guild_id", (void(*)(uint32,std::string))&lua_cross_zone_move_player_by_guild_id),
luabind::def("cross_zone_move_player_by_guild_id", (void(*)(uint32,std::string,float,float,float))&lua_cross_zone_move_player_by_guild_id),
luabind::def("cross_zone_move_player_by_guild_id", (void(*)(uint32,std::string,float,float,float,float))&lua_cross_zone_move_player_by_guild_id),
luabind::def("cross_zone_move_player_by_expedition_id", (void(*)(uint32,std::string))&lua_cross_zone_move_player_by_expedition_id),
luabind::def("cross_zone_move_player_by_expedition_id", (void(*)(uint32,std::string,float,float,float))&lua_cross_zone_move_player_by_expedition_id),
luabind::def("cross_zone_move_player_by_expedition_id", (void(*)(uint32,std::string,float,float,float,float))&lua_cross_zone_move_player_by_expedition_id),
luabind::def("cross_zone_move_player_by_client_name", (void(*)(std::string,std::string))&lua_cross_zone_move_player_by_client_name),
luabind::def("cross_zone_move_player_by_client_name", (void(*)(std::string,std::string,float,float,float))&lua_cross_zone_move_player_by_client_name),
luabind::def("cross_zone_move_player_by_client_name", (void(*)(std::string,std::string,float,float,float,float))&lua_cross_zone_move_player_by_client_name),
luabind::def("cross_zone_move_instance_by_char_id", (void(*)(uint32,uint16))&lua_cross_zone_move_instance_by_char_id),
luabind::def("cross_zone_move_instance_by_char_id", (void(*)(uint32,uint16,float,float,float))&lua_cross_zone_move_instance_by_char_id),
luabind::def("cross_zone_move_instance_by_char_id", (void(*)(uint32,uint16,float,float,float,float))&lua_cross_zone_move_instance_by_char_id),
luabind::def("cross_zone_move_instance_by_group_id", (void(*)(uint32,uint16))&lua_cross_zone_move_instance_by_group_id),
luabind::def("cross_zone_move_instance_by_group_id", (void(*)(uint32,uint16,float,float,float))&lua_cross_zone_move_instance_by_group_id),
luabind::def("cross_zone_move_instance_by_group_id", (void(*)(uint32,uint16,float,float,float,float))&lua_cross_zone_move_instance_by_group_id),
luabind::def("cross_zone_move_instance_by_raid_id", (void(*)(uint32,uint16))&lua_cross_zone_move_instance_by_raid_id),
luabind::def("cross_zone_move_instance_by_raid_id", (void(*)(uint32,uint16,float,float,float))&lua_cross_zone_move_instance_by_raid_id),
luabind::def("cross_zone_move_instance_by_raid_id", (void(*)(uint32,uint16,float,float,float,float))&lua_cross_zone_move_instance_by_raid_id),
luabind::def("cross_zone_move_instance_by_guild_id", (void(*)(uint32,uint16))&lua_cross_zone_move_instance_by_guild_id),
luabind::def("cross_zone_move_instance_by_guild_id", (void(*)(uint32,uint16,float,float,float))&lua_cross_zone_move_instance_by_guild_id),
luabind::def("cross_zone_move_instance_by_guild_id", (void(*)(uint32,uint16,float,float,float,float))&lua_cross_zone_move_instance_by_guild_id),
luabind::def("cross_zone_move_instance_by_expedition_id", (void(*)(uint32,uint16))&lua_cross_zone_move_instance_by_expedition_id),
luabind::def("cross_zone_move_instance_by_expedition_id", (void(*)(uint32,uint16,float,float,float))&lua_cross_zone_move_instance_by_expedition_id),
luabind::def("cross_zone_move_instance_by_expedition_id", (void(*)(uint32,uint16,float,float,float,float))&lua_cross_zone_move_instance_by_expedition_id),
luabind::def("cross_zone_move_instance_by_client_name", (void(*)(std::string,uint16))&lua_cross_zone_move_instance_by_client_name),
luabind::def("cross_zone_move_instance_by_client_name", (void(*)(std::string,uint16,float,float,float))&lua_cross_zone_move_instance_by_client_name),
luabind::def("cross_zone_move_instance_by_client_name", (void(*)(std::string,uint16,float,float,float,float))&lua_cross_zone_move_instance_by_client_name),
luabind::def("cross_zone_remove_ldon_loss_by_char_id", &lua_cross_zone_remove_ldon_loss_by_char_id),
luabind::def("cross_zone_remove_ldon_loss_by_group_id", &lua_cross_zone_remove_ldon_loss_by_group_id),
luabind::def("cross_zone_remove_ldon_loss_by_raid_id", &lua_cross_zone_remove_ldon_loss_by_raid_id),
+14 -2
View File
@@ -2532,6 +2532,11 @@ void Lua_Mob::ApplySpellBuff(int spell_id, int duration) {
self->ApplySpellBuff(spell_id, duration);
}
void Lua_Mob::ApplySpellBuff(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpellBuff(spell_id, level);
}
int Lua_Mob::GetBuffStatValueBySlot(uint8 slot, const char* identifier) {
Lua_Safe_Call_Int();
return self->GetBuffStatValueBySlot(slot, identifier);
@@ -2552,6 +2557,11 @@ void Lua_Mob::SetBuffDuration(int spell_id, int duration) {
self->SetBuffDuration(spell_id, duration);
}
void Lua_Mob::SetBuffDuration(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetBuffDuration(spell_id, duration, level);
}
Lua_Mob Lua_Mob::GetUltimateOwner() {
Lua_Safe_Call_Class(Lua_Mob);
return Lua_Mob(self->GetUltimateOwner());
@@ -3166,7 +3176,8 @@ luabind::scope lua_register_mob() {
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int64,int64,bool,bool))&Lua_Mob::AddToHateList)
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int64,int64,bool,bool,bool))&Lua_Mob::AddToHateList)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int))&Lua_Mob::ApplySpellBuff)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int, int))&Lua_Mob::ApplySpellBuff)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int,int))&Lua_Mob::ApplySpellBuff)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int,int,int))&Lua_Mob::ApplySpellBuff)
.def("Attack", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::Attack)
.def("Attack", (bool(Lua_Mob::*)(Lua_Mob,int))&Lua_Mob::Attack)
.def("Attack", (bool(Lua_Mob::*)(Lua_Mob,int,bool))&Lua_Mob::Attack)
@@ -3613,7 +3624,8 @@ luabind::scope lua_register_mob() {
.def("SetBucket", (void(Lua_Mob::*)(std::string,std::string))&Lua_Mob::SetBucket)
.def("SetBucket", (void(Lua_Mob::*)(std::string,std::string,std::string))&Lua_Mob::SetBucket)
.def("SetBuffDuration", (void(Lua_Mob::*)(int))&Lua_Mob::SetBuffDuration)
.def("SetBuffDuration", (void(Lua_Mob::*)(int, int))&Lua_Mob::SetBuffDuration)
.def("SetBuffDuration", (void(Lua_Mob::*)(int,int))&Lua_Mob::SetBuffDuration)
.def("SetBuffDuration", (void(Lua_Mob::*)(int,int,int))&Lua_Mob::SetBuffDuration)
.def("SetCurrentWP", &Lua_Mob::SetCurrentWP)
.def("SetDestructibleObject", (void(Lua_Mob::*)(bool))&Lua_Mob::SetDestructibleObject)
.def("SetDisableMelee", (void(Lua_Mob::*)(bool))&Lua_Mob::SetDisableMelee)
+2
View File
@@ -481,10 +481,12 @@ public:
bool CanRaceEquipItem(uint32 item_id);
void ApplySpellBuff(int spell_id);
void ApplySpellBuff(int spell_id, int duration);
void ApplySpellBuff(int spell_id, int duration, int level);
int GetBuffStatValueBySlot(uint8 slot, const char* identifier);
int GetBuffStatValueBySpell(int spell_id, const char* identifier);
void SetBuffDuration(int spell_id);
void SetBuffDuration(int spell_id, int duration);
void SetBuffDuration(int spell_id, int duration, int level);
void CloneAppearance(Lua_Mob other);
void CloneAppearance(Lua_Mob other, bool clone_name);
void DamageArea(int64 damage);
+2 -2
View File
@@ -5068,7 +5068,7 @@ const char *Mob::GetCleanName()
return clean_name;
}
std::string Mob::GetTargetDescription(Mob* target, uint8 description_type)
std::string Mob::GetTargetDescription(Mob* target, uint8 description_type, uint16 entity_id_override)
{
std::string self_return = "yourself";
@@ -5119,7 +5119,7 @@ std::string Mob::GetTargetDescription(Mob* target, uint8 description_type)
fmt::format(
"{} ({})",
target->GetCleanName(),
target->GetID()
entity_id_override ? entity_id_override : target->GetID()
)
)
);
+4 -4
View File
@@ -41,7 +41,7 @@
char* strn0cpy(char* dest, const char* source, uint32 size);
#define MAX_SPECIAL_ATTACK_PARAMS 8
#define MAX_SPECIAL_ATTACK_PARAMS 9
class Client;
class EQApplicationPacket;
@@ -497,8 +497,8 @@ public:
void ListAppearanceEffects(Client* c);
void ClearAppearenceEffects();
void SendSavedAppearenceEffects(Client *receiver);
void SetBuffDuration(int spell_id, int duration = 0);
void ApplySpellBuff(int spell_id, int duration = 0);
void SetBuffDuration(int spell_id, int duration = 0, int level_override = -1);
void ApplySpellBuff(int spell_id, int duration = 0, int level_override = -1);
int GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier);
int GetBuffStatValueBySlot(uint8 slot, const char* stat_identifier);
@@ -586,7 +586,7 @@ public:
virtual void SetName(const char *new_name = nullptr) { new_name ? strn0cpy(name, new_name, 64) :
strn0cpy(name, GetName(), 64); return; };
inline Mob* GetTarget() const { return target; }
std::string GetTargetDescription(Mob* target, uint8 description_type = TargetDescriptionType::LCSelf);
std::string GetTargetDescription(Mob* target, uint8 description_type = TargetDescriptionType::LCSelf, uint16 entity_id_override = 0);
virtual void SetTarget(Mob* mob);
inline bool HasTargetReflection() const { return (target && target != this && target->target == this); }
virtual inline float GetHPRatio() const { return max_hp == 0 ? 0 : ((float) current_hp / max_hp * 100); }
+100 -16
View File
@@ -65,24 +65,59 @@ void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration)
self->ApplySpell(spell_id, duration);
}
void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo);
}
void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id)
{
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
uint32 Perl_Bot_CountBotItem(Bot* self, uint32 item_id)
@@ -315,24 +350,59 @@ void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration)
self->SetSpellDuration(spell_id, duration);
}
void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration);
}
void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id)
{
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id)
{
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration)
{
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
bool Perl_Bot_ReloadBotDataBuckets(Bot* self)
@@ -473,10 +543,17 @@ void perl_register_bot()
package.add("AddItem", &Perl_Bot_AddItem);
package.add("ApplySpell", (void(*)(Bot*, int))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int, bool))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int, int))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_ApplySpell);
package.add("ApplySpellGroup", (void(*)(Bot*, int))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int, bool))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int, int))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellRaid", (void(*)(Bot*, int))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int, int))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int, int, bool, bool))&Perl_Bot_ApplySpellRaid);
package.add("Camp", (void(*)(Bot*))&Perl_Bot_Camp);
package.add("Camp", (void(*)(Bot*, bool))&Perl_Bot_Camp);
package.add("CountAugmentEquippedByID", &Perl_Bot_CountAugmentEquippedByID);
@@ -533,10 +610,17 @@ void perl_register_bot()
package.add("SetExpansionBitmask", (void(*)(Bot*, int, bool))&Perl_Bot_SetExpansionBitmask);
package.add("SetSpellDuration", (void(*)(Bot*, int))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int, bool))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int, int))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int, bool))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int, int))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int, int))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int, int, bool, bool))&Perl_Bot_SetSpellDurationRaid);
package.add("Signal", &Perl_Bot_Signal);
package.add("Sit", &Perl_Bot_Sit);
package.add("Stand", &Perl_Bot_Stand);
+87 -50
View File
@@ -2616,59 +2616,74 @@ void Perl_Client_ApplySpell(Client* self, int spell_id, int duration)
self->ApplySpell(spell_id, duration);
}
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level);
}
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only)
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots)
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id)
@@ -2681,59 +2696,74 @@ void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration)
self->SetSpellDuration(spell_id, duration);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration, level);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id)
{
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only)
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots)
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
}
perl::array Perl_Client_GetPEQZoneFlags(Client* self)
@@ -2985,17 +3015,20 @@ void perl_register_client()
package.add("Admin", &Perl_Client_Admin);
package.add("ApplySpell", (void(*)(Client*, int))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, int))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, int, bool))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_ApplySpell);
package.add("ApplySpellGroup", (void(*)(Client*, int))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, int))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, int, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellRaid", (void(*)(Client*, int))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int, bool, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("AssignTask", (void(*)(Client*, int))&Perl_Client_AssignTask);
package.add("AssignTask", (void(*)(Client*, int, int))&Perl_Client_AssignTask);
package.add("AssignTask", (void(*)(Client*, int, int, bool))&Perl_Client_AssignTask);
@@ -3410,17 +3443,21 @@ void perl_register_client()
package.add("SetSkillPoints", &Perl_Client_SetSkillPoints);
package.add("SetSpellDuration", (void(*)(Client*, int))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, int))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, int, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDurationGroup", (void(*)(Client*, int))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, int))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, int, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationRaid", (void(*)(Client*, int))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetStartZone", (void(*)(Client*, uint32))&Perl_Client_SetStartZone);
package.add("SetStartZone", (void(*)(Client*, uint32, float, float, float))&Perl_Client_SetStartZone);
package.add("SetStartZone", (void(*)(Client*, uint32, float, float, float, float))&Perl_Client_SetStartZone);
+12
View File
@@ -2880,6 +2880,11 @@ void Perl_Mob_SetBuffDuration(Mob* self, int spell_id, int duration) // @categor
self->SetBuffDuration(spell_id, duration);
}
void Perl_Mob_SetBuffDuration(Mob* self, int spell_id, int duration, int level) // @categories Script Utility, Spells and Disciplines
{
self->SetBuffDuration(spell_id, duration, level);
}
void Perl_Mob_ApplySpellBuff(Mob* self, int spell_id) // @categories Script Utility, Spells and Disciplines
{
self->ApplySpellBuff(spell_id);
@@ -2890,6 +2895,11 @@ void Perl_Mob_ApplySpellBuff(Mob* self, int spell_id, int duration) // @categori
self->ApplySpellBuff(spell_id, duration);
}
void Perl_Mob_ApplySpellBuff(Mob* self, int spell_id, int duration, int level) // @categories Script Utility, Spells and Disciplines
{
self->ApplySpellBuff(spell_id, duration, level);
}
int Perl_Mob_GetSkillDmgAmt(Mob* self, int skill_id)
{
return self->GetSkillDmgAmt(skill_id);
@@ -3436,6 +3446,7 @@ void perl_register_mob()
package.add("AddToHateList", (void(*)(Mob*, Mob*, int64_t, int64_t, bool, bool, bool))&Perl_Mob_AddToHateList);
package.add("ApplySpellBuff", (void(*)(Mob*, int))&Perl_Mob_ApplySpellBuff);
package.add("ApplySpellBuff", (void(*)(Mob*, int, int))&Perl_Mob_ApplySpellBuff);
package.add("ApplySpellBuff", (void(*)(Mob*, int, int, int))&Perl_Mob_ApplySpellBuff);
package.add("Attack", (bool(*)(Mob*, Mob*))&Perl_Mob_Attack);
package.add("Attack", (bool(*)(Mob*, Mob*, int))&Perl_Mob_Attack);
package.add("Attack", (bool(*)(Mob*, Mob*, int, bool))&Perl_Mob_Attack);
@@ -3927,6 +3938,7 @@ void perl_register_mob()
package.add("SetBucket", (void(*)(Mob*, std::string, std::string, std::string))&Perl_Mob_SetBucket);
package.add("SetBuffDuration", (void(*)(Mob*, int))&Perl_Mob_SetBuffDuration);
package.add("SetBuffDuration", (void(*)(Mob*, int, int))&Perl_Mob_SetBuffDuration);
package.add("SetBuffDuration", (void(*)(Mob*, int, int, int))&Perl_Mob_SetBuffDuration);
package.add("SetCurrentWP", &Perl_Mob_SetCurrentWP);
package.add("SetDeltas", &Perl_Mob_SetDeltas);
package.add("SetDisableMelee", &Perl_Mob_SetDisableMelee);
+18 -8
View File
@@ -3980,15 +3980,25 @@ void QuestManager::CrossZoneMessage(uint8 update_type, int update_identifier, ui
safe_delete(pack);
}
void QuestManager::CrossZoneMove(uint8 update_type, uint8 update_subtype, int update_identifier, const char* zone_short_name, uint16 instance_id, const char* client_name) {
void QuestManager::CrossZoneMove(const CZMove_Struct& m)
{
auto pack = new ServerPacket(ServerOP_CZMove, sizeof(CZMove_Struct));
CZMove_Struct* CZM = (CZMove_Struct*)pack->pBuffer;
CZM->update_type = update_type;
CZM->update_subtype = update_subtype;
CZM->update_identifier = update_identifier;
strn0cpy(CZM->zone_short_name, zone_short_name, 32);
CZM->instance_id = instance_id;
strn0cpy(CZM->client_name, client_name, 64);
auto s = (CZMove_Struct*) pack->pBuffer;
if (!m.client_name.empty()) {
s->client_name = m.client_name;
}
s->coordinates = m.coordinates;
s->instance_id = m.instance_id;
s->update_type = m.update_type;
s->update_subtype = m.update_subtype;
s->update_identifier = m.update_identifier;
if (!m.zone_short_name.empty()) {
s->zone_short_name = m.zone_short_name;
}
worldserver.SendPacket(pack);
safe_delete(pack);
}
+1 -1
View File
@@ -312,7 +312,7 @@ public:
void CrossZoneLDoNUpdate(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 theme_id, int points = 1, const char* client_name = "");
void CrossZoneMarquee(uint8 update_type, int update_identifier, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, const char* client_name = "");
void CrossZoneMessage(uint8 update_type, int update_identifier, uint32 type, const char* message, const char* client_name = "");
void CrossZoneMove(uint8 update_type, uint8 update_subtype, int update_identifier, const char* zone_short_name, uint16 instance_id, const char* client_name = "");
void CrossZoneMove(const CZMove_Struct& m);
void CrossZoneSetEntityVariable(uint8 update_type, int update_identifier, const char* variable_name, const char* variable_value, const char* client_name = "");
void CrossZoneSignal(uint8 update_type, int update_identifier, int signal_id, const char* client_name = "");
void CrossZoneSpell(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 spell_id, const char* client_name = "");
+6 -8
View File
@@ -10378,7 +10378,7 @@ bool Mob::HasPersistDeathIllusion(int32 spell_id) {
return false;
}
void Mob::SetBuffDuration(int spell_id, int duration) {
void Mob::SetBuffDuration(int spell_id, int duration, int level) {
/*
Will refresh the buff with specified spell_id to the specified duration
@@ -10402,22 +10402,20 @@ void Mob::SetBuffDuration(int spell_id, int duration) {
int buff_count = GetMaxTotalSlots();
for (int slot = 0; slot < buff_count; slot++) {
if (!adjust_all_buffs) {
if (IsValidSpell(buffs[slot].spellid) && buffs[slot].spellid == spell_id) {
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, -1, duration, true);
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, level, duration, true);
return;
}
}
else {
} else {
if (IsValidSpell(buffs[slot].spellid)) {
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, -1, duration, true);
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, level, duration, true);
}
}
}
}
void Mob::ApplySpellBuff(int spell_id, int duration)
void Mob::ApplySpellBuff(int spell_id, int duration, int level)
{
/*
Used for quest command to apply a new buff with custom duration.
@@ -10435,7 +10433,7 @@ void Mob::ApplySpellBuff(int spell_id, int duration)
duration = PERMANENT_BUFF_DURATION;
}
SpellOnTarget(spell_id, this, 0, false, 0, false, -1, duration);
SpellOnTarget(spell_id, this, 0, false, 0, false, level, duration);
}
int Mob::GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier)
+9
View File
@@ -2736,12 +2736,18 @@ bool Mob::ApplyBardPulse(int32 spell_id, Mob *spell_target, CastingSlot slot) {
Live does not spam client with do not take hold messages. Checking here avoids that from happening. Only try to reapply if charm fades.
*/
if (spell_target->IsCharmed() && spells[spell_id].mana == 0 && spell_target->GetOwner() == this && IsEffectInSpell(spell_id, SE_Charm)) {
if (IsClient()) {
CastToClient()->CheckSongSkillIncrease(spell_id);
}
return true;
}
/*
If divine aura applied while pulsing, it is not interrupted but does not reapply until DA fades.
*/
if (DivineAura() && !IsCastNotStandingSpell(spell_id)) {
if (IsClient()) {
CastToClient()->CheckSongSkillIncrease(spell_id);
}
return true;
}
/*
@@ -2755,6 +2761,9 @@ bool Mob::ApplyBardPulse(int32 spell_id, Mob *spell_target, CastingSlot slot) {
return false;
}
if (IsClient()) {
CastToClient()->CheckSongSkillIncrease(spell_id);
}
return true;
}
+62 -47
View File
@@ -2509,98 +2509,105 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
}
case ServerOP_CZMove:
{
CZMove_Struct* CZM = (CZMove_Struct*) pack->pBuffer;
uint8 update_type = CZM->update_type;
uint8 update_subtype = CZM->update_subtype;
int update_identifier = CZM->update_identifier;
const char* zone_short_name = CZM->zone_short_name;
uint16 instance_id = CZM->instance_id;
const char* client_name = CZM->client_name;
auto s = (CZMove_Struct*) pack->pBuffer;
const std::string& client_name = s->client_name;
const glm::vec4& coordinates = s->coordinates;
const uint16 instance_id = s->instance_id;
const uint32 update_identifier = s->update_identifier;
const uint8 update_type = s->update_type;
const uint8 update_subtype = s->update_subtype;
const std::string& zone_short_name = s->zone_short_name;
if (Strings::IsNumber(client_name) || Strings::IsNumber(zone_short_name)) {
break;
}
if (update_type == CZUpdateType_Character) {
auto client = entity_list.GetClientByCharID(update_identifier);
if (client) {
Client* c = entity_list.GetClientByCharID(update_identifier);
if (c) {
switch (update_subtype) {
case CZMoveUpdateSubtype_MoveZone:
client->MoveZone(zone_short_name);
c->MoveZone(zone_short_name.c_str(), coordinates);
break;
case CZMoveUpdateSubtype_MoveZoneInstance:
client->MoveZoneInstance(instance_id);
c->MoveZoneInstance(instance_id, coordinates);
break;
}
}
} else if (update_type == CZUpdateType_Group) {
auto client_group = entity_list.GetGroupByID(update_identifier);
if (client_group) {
for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) {
if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) {
auto group_member = client_group->members[member_index]->CastToClient();
Group* g = entity_list.GetGroupByID(update_identifier);
if (g) {
for (const auto& gm : g->members) {
if (gm->IsClient()) {
Client* c = gm->CastToClient();
switch (update_subtype) {
case CZMoveUpdateSubtype_MoveZone:
group_member->MoveZone(zone_short_name);
c->MoveZone(zone_short_name.c_str(), coordinates);
break;
case CZMoveUpdateSubtype_MoveZoneInstance:
group_member->MoveZoneInstance(instance_id);
c->MoveZoneInstance(instance_id, coordinates);
break;
}
}
}
}
} else if (update_type == CZUpdateType_Raid) {
auto client_raid = entity_list.GetRaidByID(update_identifier);
if (client_raid) {
for (const auto& m : client_raid->members) {
if (m.is_bot) {
Raid* r = entity_list.GetRaidByID(update_identifier);
if (r) {
for (const auto& rm : r->members) {
if (rm.is_bot) {
continue;
}
if (m.member && m.member->IsClient()) {
auto raid_member = m.member->CastToClient();
if (rm.member && rm.member->IsClient()) {
Client* m = rm.member->CastToClient();
switch (update_subtype) {
case CZMoveUpdateSubtype_MoveZone:
raid_member->MoveZone(zone_short_name);
m->MoveZone(zone_short_name.c_str(), coordinates);
break;
case CZMoveUpdateSubtype_MoveZoneInstance:
raid_member->MoveZoneInstance(instance_id);
m->MoveZoneInstance(instance_id, coordinates);
break;
}
}
}
}
} else if (update_type == CZUpdateType_Guild) {
for (auto &client: entity_list.GetClientList()) {
if (client.second->GuildID() > 0 && client.second->GuildID() == update_identifier) {
for (auto& c : entity_list.GetClientList()) {
if (c.second && c.second->IsInAGuild() && c.second->IsInGuild(update_identifier)) {
switch (update_subtype) {
case CZMoveUpdateSubtype_MoveZone:
client.second->MoveZone(zone_short_name);
c.second->MoveZone(zone_short_name.c_str(), coordinates);
break;
case CZMoveUpdateSubtype_MoveZoneInstance:
client.second->MoveZoneInstance(instance_id);
c.second->MoveZoneInstance(instance_id, coordinates);
break;
}
}
}
} else if (update_type == CZUpdateType_Expedition) {
for (auto &client: entity_list.GetClientList()) {
if (client.second->GetExpedition() && client.second->GetExpedition()->GetID() == update_identifier) {
for (auto& c : entity_list.GetClientList()) {
if (c.second && c.second->GetExpeditionID() == update_identifier) {
switch (update_subtype) {
case CZMoveUpdateSubtype_MoveZone:
client.second->MoveZone(zone_short_name);
c.second->MoveZone(zone_short_name.c_str(), coordinates);
break;
case CZMoveUpdateSubtype_MoveZoneInstance:
client.second->MoveZoneInstance(instance_id);
c.second->MoveZoneInstance(instance_id, coordinates);
break;
}
}
}
} else if (update_type == CZUpdateType_ClientName) {
auto client = entity_list.GetClientByName(client_name);
if (client) {
Client* c = entity_list.GetClientByName(client_name.c_str());
if (c) {
switch (update_subtype) {
case CZMoveUpdateSubtype_MoveZone:
client->MoveZone(zone_short_name);
c->MoveZone(zone_short_name.c_str(), coordinates);
break;
case CZMoveUpdateSubtype_MoveZoneInstance:
client->MoveZoneInstance(instance_id);
c->MoveZoneInstance(instance_id, coordinates);
break;
}
}
@@ -3106,21 +3113,29 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
}
case ServerOP_WWMove:
{
WWMove_Struct* WWM = (WWMove_Struct*) pack->pBuffer;
uint8 update_type = WWM->update_type;
uint16 instance_id = WWM->instance_id;
const char* zone_short_name = WWM->zone_short_name;
uint8 min_status = WWM->min_status;
uint8 max_status = WWM->max_status;
auto m = (WWMove_Struct*) pack->pBuffer;
uint16 instance_id = m->instance_id;
uint8 max_status = m->max_status;
uint8 min_status = m->min_status;
uint8 update_type = m->update_type;
std::string zone_short_name = m->zone_short_name;
for (auto &client : entity_list.GetClientList()) {
switch (update_type) {
case WWMoveUpdateType_MoveZone:
if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) {
client.second->MoveZone(zone_short_name);
if (
client.second->Admin() >= min_status &&
(client.second->Admin() <= max_status || max_status == AccountStatus::Player)
) {
client.second->MoveZone(zone_short_name.c_str());
}
break;
case WWMoveUpdateType_MoveZoneInstance:
if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) {
if (
client.second->Admin() >= min_status &&
(client.second->Admin() <= max_status || max_status == AccountStatus::Player)
) {
client.second->MoveZoneInstance(instance_id);
}
break;
+44 -26
View File
@@ -575,32 +575,41 @@ void Client::MovePC(uint32 zoneID, uint32 instanceID, float x, float y, float z,
}
void Client::MoveZone(const char *zone_short_name, const glm::vec4 &location) {
ProcessMovePC(ZoneID(zone_short_name), 0, location.x, location.y, location.z, location.w, 3, ZoneToSafeCoords);
const bool use_coordinates = (
location.x != 0.0f ||
location.y != 0.0f ||
location.z != 0.0f ||
location.w != 0.0f
);
const ZoneMode zone_type = use_coordinates ? ZoneSolicited : ZoneToSafeCoords;
ProcessMovePC(ZoneID(zone_short_name), 0, location.x, location.y, location.z, location.w, 3, zone_type);
}
void Client::MoveZoneGroup(const char *zone_short_name, const glm::vec4 &location) {
if (!GetGroup()) {
Group* g = GetGroup();
if (!g) {
MoveZone(zone_short_name, location);
} else {
auto client_group = GetGroup();
for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) {
if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) {
auto group_member = client_group->members[member_index]->CastToClient();
group_member->MoveZone(zone_short_name, location);
for (const auto& gm : g->members) {
if (gm && gm->IsClient()) {
Client* c = gm->CastToClient();
c->MoveZone(zone_short_name, location);
}
}
}
}
void Client::MoveZoneRaid(const char *zone_short_name, const glm::vec4 &location) {
if (!GetRaid()) {
Raid* r = GetRaid();
if (!r) {
MoveZone(zone_short_name, location);
} else {
auto client_raid = GetRaid();
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
auto raid_member = client_raid->members[member_index].member->CastToClient();
raid_member->MoveZone(zone_short_name, location);
for (const auto& rm : r->members) {
if (rm.member && rm.member->IsClient()) {
Client* c = rm.member->CastToClient();
c->MoveZone(zone_short_name, location);
}
}
}
@@ -611,32 +620,41 @@ void Client::MoveZoneInstance(uint16 instance_id, const glm::vec4 &location) {
database.AddClientToInstance(instance_id, CharacterID());
}
ProcessMovePC(database.GetInstanceZoneID(instance_id), instance_id, location.x, location.y, location.z, location.w, 3, ZoneToSafeCoords);
const bool use_coordinates = (
location.x != 0.0f ||
location.y != 0.0f ||
location.z != 0.0f ||
location.w != 0.0f
);
const ZoneMode zone_type = use_coordinates ? ZoneSolicited : ZoneToSafeCoords;
ProcessMovePC(database.GetInstanceZoneID(instance_id), instance_id, location.x, location.y, location.z, location.w, 3, zone_type);
}
void Client::MoveZoneInstanceGroup(uint16 instance_id, const glm::vec4 &location) {
if (!GetGroup()) {
Group* g = GetGroup();
if (!g) {
MoveZoneInstance(instance_id, location);
} else {
auto client_group = GetGroup();
for (int member_index = 0; member_index < MAX_GROUP_MEMBERS; member_index++) {
if (client_group->members[member_index] && client_group->members[member_index]->IsClient()) {
auto group_member = client_group->members[member_index]->CastToClient();
group_member->MoveZoneInstance(instance_id, location);
for (const auto& gm : g->members) {
if (gm && gm->IsClient()) {
Client* c = gm->CastToClient();
c->MoveZoneInstance(instance_id, location);
}
}
}
}
void Client::MoveZoneInstanceRaid(uint16 instance_id, const glm::vec4 &location) {
if (!GetRaid()) {
Raid* r = GetRaid();
if (!r) {
MoveZoneInstance(instance_id, location);
} else {
auto client_raid = GetRaid();
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
auto raid_member = client_raid->members[member_index].member->CastToClient();
raid_member->MoveZoneInstance(instance_id, location);
for (const auto& rm : r->members) {
if (rm.member && rm.member->IsClient()) {
Client* c = rm.member->CastToClient();
c->MoveZoneInstance(instance_id, location);
}
}
}