Dungeon Crawl custom code merge

Added numerous modding hooks.
Added rules:
	Character:KeepLevelOverMax - Don't delevel a character if they are found to be over max level rule.
	Spells:UseCHAScribeHack - Optionally omit spells with CHA in effect12 when using scribespells and traindiscs
	Combat:MonkACBonusWeight - Adjust the weight threshold for monk AC bonus
	Combat:ClientStunLevel - Adjust the level clients kicks and bashes start to roll for stuns
	Combat;QuiverWRHasteDiv - Adjust the divisor applied to weight reduction for haste calcs
	Combat:UseArcheryBonusRoll - Make archery stationary bonus a roll
	Combat:ArcheryBonusChance - Archery stationary bonus chance

Added account flags and associated perl wrappers
Added EVENT_ITEM_TICK for interactive items
Added EVENT_DUEL_WIN and EVENT_DUEL_LOSE, which exports $enemyname and $enemyid
Added timer and interval to console worldshutdown command
Added EQW interface for worldshutdown and server-wide messages
This commit is contained in:
Tabasco
2013-04-24 15:58:51 -05:00
parent b15cb08f54
commit 56490400ca
45 changed files with 1321 additions and 156 deletions
+64 -1
View File
@@ -143,7 +143,17 @@ XS(XS_NPC_AddLootTable)
if(THIS == NULL)
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
THIS->AddLootTable();
uint32 loottable_id = 0;
if(items > 1)
{
loottable_id = (uint32)SvUV(ST(1));
THIS->AddLootTable(loottable_id);
}
else
{
THIS->AddLootTable();
}
}
XSRETURN_EMPTY;
}
@@ -2075,6 +2085,57 @@ XS(XS_NPC_GetAccuracyRating)
XSRETURN(1);
}
XS(XS_NPC_GetSpawnKillCount); /* prototype to pass -Wmissing-prototypes */
XS(XS_NPC_GetSpawnKillCount)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: NPC::GetSpawnKillCount(THIS)");
{
NPC * THIS;
uint32 RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "NPC")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(NPC *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type NPC");
if(THIS == NULL)
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
RETVAL = THIS->GetSpawnKillCount();
XSprePUSH; PUSHu((UV)RETVAL);
}
XSRETURN(1);
}
XS(XS_NPC_GetScore); /* prototype to pass -Wmissing-prototypes */
XS(XS_NPC_GetScore)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: NPC::GetScore(THIS)");
{
NPC * THIS;
int RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "NPC")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(NPC *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type NPC");
if(THIS == NULL)
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
RETVAL = THIS->GetScore();
XSprePUSH; PUSHi((UV)RETVAL);
}
XSRETURN(1);
}
#ifdef __cplusplus
extern "C"
@@ -2174,6 +2235,8 @@ XS(boot_NPC)
newXSproto(strcpy(buf, "GetSlowMitigation"), XS_NPC_GetAttackSpeed, file, "$");
newXSproto(strcpy(buf, "GetAttackSpeed"), XS_NPC_GetSlowMitigation, file, "$");
newXSproto(strcpy(buf, "GetAccuracyRating"), XS_NPC_GetAccuracyRating, file, "$");
newXSproto(strcpy(buf, "GetSpawnKillCount"), XS_NPC_GetSpawnKillCount, file, "$");
newXSproto(strcpy(buf, "GetScore"), XS_NPC_GetSpawnKillCount, file, "$");
XSRETURN_YES;
}