# Effect History Entry Weapon
Grammar — Weapon for effect history history entry index
Flags —Native
|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
— Historyint
— Index
Returns — string
<gamelink::Weapon>
native string EffectHistoryGetWeapon(
effecthistory inHistory,
int inIndex,
);
# Related
Category: Effect History / Entries
- Effect History Entry Ability —
string
<gamelink::Abil> — EffectHistoryGetAbil - Effect History Entry Amount —
fixed
— EffectHistoryGetAmountFixed - Effect History Entry Amount As Integer —
int
— EffectHistoryGetAmountInt - Effect History Entry Effect —
string
<gamelink::Effect> — EffectHistoryGetEffect - Effect History Entry Time —
fixed
— EffectHistoryGetTime - Effect History Entry Type —
int
<preset::EffectHistory> — EffectHistoryGetType - Effect History Entry Unit —
unit
— EffectHistoryGetUnitByLocation - Effect History Entry Weapon —
string
<gamelink::Weapon> — EffectHistoryGetWeapon
# Examples
mods/heroesdata.stormmod — base.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.stormmod — base.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)));