Add --raid to perl-doc-parser.pl and update usage docs for perl_raids.cpp

This commit is contained in:
Akkadius 2018-07-01 20:39:07 -05:00
parent d331114f71
commit 57c1cd0be4
2 changed files with 22 additions and 15 deletions

View File

@ -10,6 +10,7 @@ sub usage() {
print " --door - Prints methods for just door class methods\n"; print " --door - Prints methods for just door class methods\n";
print " --object - Prints methods for just object class methods\n"; print " --object - Prints methods for just object class methods\n";
print " --group - Prints methods for just group class methods\n"; print " --group - Prints methods for just group class methods\n";
print " --raid - Prints methods for just raid class methods\n";
print " --corpse - Prints methods for just corpse class methods\n"; print " --corpse - Prints methods for just corpse class methods\n";
print " --hateentry - Prints methods for just hateentry class methods\n"; print " --hateentry - Prints methods for just hateentry class methods\n";
print " --all - Prints methods for all classes\n"; print " --all - Prints methods for all classes\n";
@ -52,7 +53,7 @@ for my $file (@files) {
chomp; chomp;
$line = $_; $line = $_;
if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::|Object::/i && $line=~/_croak/i) { if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::|Object::|Raid::/i && $line=~/_croak/i) {
#::: Client export #::: Client export
if ($export=~/all|client/i) { if ($export=~/all|client/i) {
@ -102,6 +103,12 @@ for my $file (@files) {
$object_prefix = "\$group->"; $object_prefix = "\$group->";
} }
#::: Raid export
if ($export=~/all|raid/i) {
$split_key = "Raid::";
$object_prefix = "\$raid->";
}
#::: Hateentry export #::: Hateentry export
if ($export=~/all|hateentry/i) { if ($export=~/all|hateentry/i) {
$split_key = "HateEntry::"; $split_key = "HateEntry::";

View File

@ -47,7 +47,7 @@ XS(XS_Raid_IsRaidMember)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::IsRaidMember(THIS, name)"); Perl_croak(aTHX_ "Usage: Raid::IsRaidMember(THIS, string name)");
{ {
Raid * THIS; Raid * THIS;
bool RETVAL; bool RETVAL;
@ -74,7 +74,7 @@ XS(XS_Raid_CastGroupSpell)
{ {
dXSARGS; dXSARGS;
if (items != 4) if (items != 4)
Perl_croak(aTHX_ "Usage: Raid::CastGroupSpell(THIS, caster, spellid, gid)"); Perl_croak(aTHX_ "Usage: Raid::CastGroupSpell(THIS, Mob* caster, uint16 spell_id, uint32 group_id)");
{ {
Raid * THIS; Raid * THIS;
Mob* caster; Mob* caster;
@ -109,7 +109,7 @@ XS(XS_Raid_GroupCount)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::GroupCount(THIS, gid)"); Perl_croak(aTHX_ "Usage: Raid::GroupCount(THIS, uint32 group_id)");
{ {
Raid * THIS; Raid * THIS;
uint8 RETVAL; uint8 RETVAL;
@ -162,7 +162,7 @@ XS(XS_Raid_GetGroup)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::GetGroup(THIS, name)"); Perl_croak(aTHX_ "Usage: Raid::GetGroup(THIS, string name)");
{ {
Raid * THIS; Raid * THIS;
uint32 RETVAL; uint32 RETVAL;
@ -189,7 +189,7 @@ XS(XS_Raid_SplitExp)
{ {
dXSARGS; dXSARGS;
if (items != 3) if (items != 3)
Perl_croak(aTHX_ "Usage: Raid::SplitExp(THIS, exp, other)"); Perl_croak(aTHX_ "Usage: Raid::SplitExp(THIS, uint32 experience, [Mob* other = nullptr])");
{ {
Raid * THIS; Raid * THIS;
uint32 exp = (uint32)SvUV(ST(1)); uint32 exp = (uint32)SvUV(ST(1));
@ -223,7 +223,7 @@ XS(XS_Raid_GetTotalRaidDamage)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::GetTotalRaidDamage(THIS, other)"); Perl_croak(aTHX_ "Usage: Raid::GetTotalRaidDamage(THIS, [Mob* other = nullptr])");
{ {
Raid * THIS; Raid * THIS;
uint32 RETVAL; uint32 RETVAL;
@ -259,7 +259,7 @@ XS(XS_Raid_SplitMoney)
{ {
dXSARGS; dXSARGS;
if (items != 5) if (items != 5)
Perl_croak(aTHX_ "Usage: Raid::SplitMoney(THIS, copper, silver, gold, platinum)"); Perl_croak(aTHX_ "Usage: Raid::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)");
{ {
Raid * THIS; Raid * THIS;
uint32 copper = (uint32)SvUV(ST(1)); uint32 copper = (uint32)SvUV(ST(1));
@ -286,7 +286,7 @@ XS(XS_Raid_BalanceHP)
{ {
dXSARGS; dXSARGS;
if (items != 3) if (items != 3)
Perl_croak(aTHX_ "Usage: Raid::BalanceHP(THIS, penalty, gid)"); Perl_croak(aTHX_ "Usage: Raid::BalanceHP(THIS, int32 penalty, uint32 group_id)");
{ {
Raid * THIS; Raid * THIS;
int32 penalty = (int32)SvUV(ST(1)); int32 penalty = (int32)SvUV(ST(1));
@ -311,7 +311,7 @@ XS(XS_Raid_IsLeader)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::IsLeader(THIS, name)"); Perl_croak(aTHX_ "Usage: Raid::IsLeader(THIS, string name)");
{ {
Raid * THIS; Raid * THIS;
bool RETVAL; bool RETVAL;
@ -338,7 +338,7 @@ XS(XS_Raid_IsGroupLeader)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::IsGroupLeader(THIS, who)"); Perl_croak(aTHX_ "Usage: Raid::IsGroupLeader(THIS, string name)");
{ {
Raid * THIS; Raid * THIS;
bool RETVAL; bool RETVAL;
@ -417,7 +417,7 @@ XS(XS_Raid_GetClientByIndex)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, index)"); Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, uint16 raid_indez)");
{ {
Raid * THIS; Raid * THIS;
Client * RETVAL; Client * RETVAL;
@ -444,7 +444,7 @@ XS(XS_Raid_TeleportGroup)
{ {
dXSARGS; dXSARGS;
if (items != 8) if (items != 8)
Perl_croak(aTHX_ "Usage: Raid::TeleportGroup(THIS, sender, zoneID, x, y, z, heading, gid)"); Perl_croak(aTHX_ "Usage: Raid::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading, uint32 group_id)");
{ {
Raid * THIS; Raid * THIS;
Mob* sender; Mob* sender;
@ -483,7 +483,7 @@ XS(XS_Raid_TeleportRaid)
{ {
dXSARGS; dXSARGS;
if (items != 7) if (items != 7)
Perl_croak(aTHX_ "Usage: Raid::TeleportRaid(THIS, sender, zoneID, x, y, z, heading)"); Perl_croak(aTHX_ "Usage: Raid::TeleportRaid(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)");
{ {
Raid * THIS; Raid * THIS;
Mob* sender; Mob* sender;
@ -547,7 +547,7 @@ XS(XS_Raid_GetMember)
{ {
dXSARGS; dXSARGS;
if (items != 2) if (items != 2)
Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, index)"); Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, int raid_index)");
{ {
Raid * THIS; Raid * THIS;
Client* RETVAL = nullptr; Client* RETVAL = nullptr;