kevL / TccScripts

4 stars 0 forks source link

Weirdness in DoMagicCrafting #13

Closed vandervecken closed 6 years ago

vandervecken commented 6 years ago

Aqvilinus says:

In DoMagicCrafting() there’s a caster level check.

// Check if caster is of sufficient level
int iCasterLevel = GetCasterLevel(oCrafter);
int iCasterLevel2 = 0;
if (GetLevelByClass(CLASS_TYPE_WARLOCK, oCrafter) > 0)
{
    iCasterLevel2 = GetWarlockCasterLevel(oCrafter);
}
if (GetLevelByClass(CLASS_TYPE_RANGER, oCrafter) > 0 || GetLevelByClass(CLASS_TYPE_PALADIN, oCrafter) > 0)
{
    iCasterLevel2 = GetPalRngCasterLevel(oCrafter);
}

if (iCasterLevel2 > iCasterLevel)
    iCasterLevel = iCasterLevel2;

Don’t know why, but it looks kinda strange for me…

KevL says: perhaps because if a char has levels in Ranger/Paladin AND Warlock, the former will overrule the latter even if the latter is higher

Aqvilinus says: Can GetLastSpellCastClass() be used here?

KevL says: probly. Better test it tho

kevL commented 6 years ago

the code Aq posted there is from the kPrC Pack -- does not pertain to TCC scripts.

vote to close

Aqvilinus commented 6 years ago

Yeah, this issue is a part of the other one – «Make TCC work with Kaedrin's PRC pack».

kevL commented 6 years ago

k let's move any discussion there