anon
Inactive Member-
Posts
5 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by anon
-
Change Bonus of Party ? (Leadership)
anon replied to Barissa's topic in Community Support - Questions & Answers
I think POINT_PARTY_HASTE_BONUS gives speed attack. Value of that bonus you can find in void CParty::ComputeRolePoint(LPCHARACTER ch, BYTE bRole, bool bAdd) here case PARTY_ROLE_HASTE: { int iBonus = (int) (1+5*k); if (ch->GetPoint(POINT_PARTY_HASTE_BONUS) != iBonus) { ch->PointChange(POINT_PARTY_HASTE_BONUS, iBonus - ch->GetPoint(POINT_PARTY_HASTE_BONUS)); ch->ComputePoints(); } } break; If you want to change POINT_PARTY_HASTE_BONUS which gives attack speed to something else there are couple ways to do this. So for example If you want to change POINT_PARTY_HASTE_BONUS from attack speed to strong against monsters: First one is about changing where bonus you want is calculated to do this: you need to remove PointChange(POINT_ATT_SPEED, GetPoint(POINT_PARTY_HASTE_BONUS)); from void CHARACTER::ComputePoints() and then add value of POINT_PARTY_HASTE_BONUS during calculation of attack bonus so in int CalcAttBonus(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, int iAtk) you change iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_MONSTER)) / 100; to iAtk += (iAtk * (pkAttacker->GetPoint(POINT_ATTBONUS_MONSTER) + pkAttacker->GetPoint(POINT_PARTY_HASTE_BONUS))) / 100; after this you should see diference in dmg but also there is another way. little bit different where you have POINT_ATTBONUS_MONSTER as value of that particular bonus and when ComputePoints is invoken POINT_PARTY_HASTE_BONUS is added to POINT_ATTBONUS_MONSTER bonus value. In this case you can see real bonus value in client in your bonus value window without adding value of POINT_PARTY_HASTE_BONUS. But probably you will send more data during ComputePoints. If you want second version tell me then I will try to add some code. Also probably there are another ways to do this kind of stuff. -
How to add a restriction to speed shoes
anon replied to CristianDragan's topic in Community Support - Questions & Answers
Hi Cristian, item.cpp isn't probably the best place to add this restriction. What I would do to implement this is : in char_item.cpp Above bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) add bool isSpeedShoe(DWORD itemVnum) { return (itemVnum == UNIQUE_ITEM_SPEED_SHOES) || (itemVnum == UNIQUE_ITEM_SPEED_SHOES2) || (itemVnum == UNIQUE_ITEM_SPEED_SHOES3); } in bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) in if (item->GetWearFlag() & WEARABLE_UNIQUE) add if (isSpeedShoe(item->GetVnum)) { if ((GetWear(WEAR_UNIQUE1) && isSpeedShoe(GetWear(WEAR_UNIQUE1)->GetVnum())) || (GetWear(WEAR_UNIQUE2) && isSpeedShoe(GetWear(WEAR_UNIQUE2)->GetVnum()))) { ChatPacket(CHAT_TYPE_INFO, "You cannot equip this item twice"); return false; } } -
It doesn't look very straightforward for me. I would be very grateful if you would post tutorial specific to mt binary. For example I've looked at CEF documentaiton and I have many questions. Like when I should create instance of browser. In documentation it says a lot about how many processess, and resources it needs, so probably I need to create instance only when player wants to use this feature and destroy instance when player finished?. Should I create another thread to run this? How to communicate with this thread - using some kind of mutexes? What If i want reload page, or go back one page in history. Probably version with dll is better than static compilation, which other dlls I need to put in my client?
-
Hi Recently I was thinking about alternatives to CWebBrowser in client binary. There is requirement in my current project to display web-pages which are modern heavy JavaScript types one. Based on my experience I can tell that, CWebBrowser is not able to handle rendering of modern websites. As alternative I found Chromium Embedded Framework and it seems like reasonable choose. Before I start any work I want to know your opinion guys. 1. Question : How would you handle displaying modern websites in Client? Maybe there is some python based solution I don't know about, or c++ based? Or there is possible to fix current CWebBrowser solution? I am really curious about your ideas. Thanks, Sincerly, Anon