# Effect History Entry Weapon

Grammar — Weapon for effect history history entry index
FlagsNative | Function

Returns the weapon that originated the effect that was logged in the Effect History at the specified Index. If the effect came from an ability rather than a weapon, this will return No Game Link.

# Arguments

  • effecthistory — History
  • int — Index

Returns — string<gamelink::Weapon>

native string EffectHistoryGetWeapon(
	effecthistory inHistory,
	int inIndex,
);

Category: Effect History / Entries

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:1959

            lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogEffect, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), "SourceButtonFace", c_playerAny));
        }
        if (((lv_effectingUnitType == null) || ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetWeapon(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) == "")))) {
            lv_effectHistoryEntryAbility = "DebugUnknownAbility";
            lv_debugString = (EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent));

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:9364

        lv_dataType = EffectHistoryGetType(lv_history, lv_itEntry);
        lv_dataUnit = EffectHistoryGetUnitByLocation(lv_history, lv_itEntry, c_effectUnitCaster);
        lv_dataWeapon = EffectHistoryGetWeapon(lv_history, lv_itEntry);
        TextExpressionSetToken("Param/Expression/lib_UIUI_199067E4", "A", IntToText(lv_itEntry));
        TextExpressionSetToken("Param/Expression/lib_UIUI_199067E4", "D", StringToText((lv_dataEffectCurrent)));