Jump to content

Digest January-March

We talk about what was done and updated in the past month. We help keep abreast of events.

March February January

Servers monitoring and the Addons Editor

We present you two legends. All dreams come true.

Servers monitoring The Addons Editor

A statistics bot for Telegram

Convenient analytics right on your phone.

Read more

Game tooltips

Tooltips provide a way for 3rd party fansites and extensions to display detailed information on mouseover.

Read more

The Addons Updater

Let us to introduce the addons updating software and to share the details

Read more Download

слава и престиж


Fef

Recommended Posts

Доброго времени суток

Пишу аддон для сбора статистики гильдии. В частности хочется извлекать славу и престиж набранные игроками.

И то и другое находится у memberInfo в таблице profit.

Выглядит это примерно так:

gm: profit:=table: 3FF325F0{table}

gm: 1:=table: 0E963EC0{table}

gm: value:=table: 0E963EE8{table}

gm: profitForPeriod:=125{number}

gm: totalProfit:=125{number}

gm: key:=userdata: 0E9CF388{userdata}

gm: 0:=table: 3FF32618{table}

gm: value:=table: 2B2C10E8{table}

gm: profitForPeriod:=750{number}

gm: totalProfit:=1250{number}

gm: key:=userdata: 2BD7A960{userdata}

Проблема в том что по моим наблюдениями таблица "0" иногда является славой, а иногда престижем, я не уловил как по ключу понять где слава. В апи так же не нашел каких либо функций возвращающих славу/престиж.

Можете подсказать возможно ли идентифицировать или получить нужный ресурс в текущем апи?

Link to comment
Share on other sites

По идентификатору валюты. Если идентификатор валюты - слава, то валюта - слава. Если идентификатор валюты престиж, то валюта - престиж. Логично же.

--Prestige and Fame added in MWar afterpatch.
BaseList[i].totlPrestige = 0
BaseList[i].weekPrestige = 0
BaseList[i].totlFame = 0
BaseList[i].weekFame = 0
if members[i].profit then
for ii, vv in members[i].profit do
 if userMods.FromWString(avatar.GetCurrencyInfo(vv.key).name) == "Престиж" then
 BaseList[i].totlPrestige = vv.value.totalProfit
 BaseList[i].weekPrestige = vv.value.profitForPeriod
 elseif userMods.FromWString(avatar.GetCurrencyInfo(vv.key).name) == "Слава" then
 BaseList[i].totlFame = vv.value.totalProfit
 BaseList[i].weekFame = vv.value.profitForPeriod
 end
end
end

key это как раз и есть идентификатор валюты, и по нему легко определить что это за валюта.

И вообще, спать надо в 4 ночи а не аддоны писать :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use