root/trunk/AE-go_GameServer/src/com/aionemu/gameserver/model/gameobjects/player/Prices.java
| 2343 | 2440 | ||
|---|---|---|---|
90 | * @param basePrice | 90 | * @param basePrice |
91 | * @return modifiedPrice | 91 | * @return modifiedPrice |
92 | */ | 92 | */ |
93 | public int getPriceForService(int basePrice) | 93 | public long getPriceForService(long basePrice) |
94 | { | 94 | { |
95 | // Tricky. Requires multiplication by Prices, Modifier, Taxes | 95 | // Tricky. Requires multiplication by Prices, Modifier, Taxes |
96 | // In order, and round down each time to match client calculation. | 96 | // In order, and round down each time to match client calculation. |
97 | return (int)((int)((int)(basePrice * | 97 | return (long)((long)((long)(basePrice * |
98 | this.getGlobalPrices() / 100D) * | 98 | this.getGlobalPrices() / 100D) * |
99 | this.getGlobalPricesModifier() / 100D) * | 99 | this.getGlobalPricesModifier() / 100D) * |
100 | this.getTaxes() / 100D); | 100 | this.getTaxes() / 100D); |
... | ... | ||
104 | * @param requiredKinah | 104 | * @param requiredKinah |
105 | * @return modified requiredKinah | 105 | * @return modified requiredKinah |
106 | */ | 106 | */ |
107 | public int getKinahForBuy(int requiredKinah) | 107 | public long getKinahForBuy(long requiredKinah) |
108 | { | 108 | { |
109 | // Requires double precision for 2mil+ kinah items | 109 | // Requires double precision for 2mil+ kinah items |
110 | return (int)((int)((int)((int)(requiredKinah * | 110 | return (long)((long)((long)((long)(requiredKinah * |
111 | this.getVendorBuyModifier() / 100.0D) * | 111 | this.getVendorBuyModifier() / 100.0D) * |
112 | this.getGlobalPrices() / 100.0D) * | 112 | this.getGlobalPrices() / 100.0D) * |
113 | this.getGlobalPricesModifier() / 100.0D) * | 113 | this.getGlobalPricesModifier() / 100.0D) * |
... | ... | ||
118 | * @param kinahReward | 118 | * @param kinahReward |
119 | * @return | 119 | * @return |
120 | */ | 120 | */ |
121 | public int getKinahForSell(int kinahReward) | 121 | public long getKinahForSell(long kinahReward) |
122 | { | 122 | { |
123 | return (int)(kinahReward * this.getVendorSellModifier() / 100D); | 123 | return (long)(kinahReward * this.getVendorSellModifier() / 100D); |
124 | } | 124 | } |
125 | 125 | ||
126 | } | 126 | } |
Download diff