Merge branch 'master' into raycast

This commit is contained in:
KimLS
2014-03-01 17:49:21 -08:00
44 changed files with 747 additions and 385 deletions
+38 -26
View File
@@ -1615,7 +1615,8 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
if (shield_target)
{
entity_list.MessageClose(this,false,100,0,"%s ceases shielding %s.",GetName(),shield_target->GetName());
entity_list.MessageClose_StringID(this, false, 100, 0,
END_SHIELDING, GetName(), shield_target->GetName());
for (int y = 0; y < 2; y++)
{
if (shield_target->shielder[y].shielder_id == GetID())
@@ -1640,7 +1641,8 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
{
if (shield_target->shielder[x].shielder_id == 0)
{
entity_list.MessageClose(this,false,100,0,"%s uses their shield to guard %s.",GetName(),shield_target->GetName());
entity_list.MessageClose_StringID(this ,false, 100, 0,
START_SHIELDING, GetName(), shield_target->GetName());
shield_target->shielder[x].shielder_id = GetID();
int shieldbonus = shield->AC*2;
switch (GetAA(197))
@@ -1677,7 +1679,7 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
}
if (!ack)
{
Message(0, "No more than two warriors may shield the same being.");
Message_StringID(0, ALREADY_SHIELDED);
shield_target = 0;
return;
}
@@ -12618,32 +12620,38 @@ void Client::Handle_OP_AltCurrencySellSelection(const EQApplicationPacket *app)
uint32 cost = 0;
uint32 current_currency = GetAlternateCurrencyValue(alt_cur_id);
uint32 merchant_id = tar->MerchantType;
bool found = false;
std::list<MerchantList> merlist = zone->merchanttable[merchant_id];
std::list<MerchantList>::const_iterator itr;
for(itr = merlist.begin(); itr != merlist.end(); ++itr) {
MerchantList ml = *itr;
if(GetLevel() < ml.level_required) {
continue;
if (RuleB(Merchant, EnableAltCurrencySell)) {
bool found = false;
std::list<MerchantList> merlist = zone->merchanttable[merchant_id];
std::list<MerchantList>::const_iterator itr;
for (itr = merlist.begin(); itr != merlist.end(); ++itr) {
MerchantList ml = *itr;
if (GetLevel() < ml.level_required) {
continue;
}
int32 fac = tar->GetPrimaryFaction();
if (fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required) {
continue;
}
item = database.GetItem(ml.item);
if (!item)
continue;
if (item->ID == inst->GetItem()->ID) {
cost = ml.alt_currency_cost;
found = true;
break;
}
}
int32 fac = tar->GetPrimaryFaction();
if(fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required) {
continue;
}
item = database.GetItem(ml.item);
if(!item)
continue;
if(item->ID == inst->GetItem()->ID) {
cost = ml.alt_currency_cost;
found = true;
break;
if (!found) {
cost = 0;
}
}
if(!found) {
else {
cost = 0;
}
@@ -12793,6 +12801,10 @@ void Client::Handle_OP_AltCurrencySell(const EQApplicationPacket *app) {
return;
}
if (!RuleB(Merchant, EnableAltCurrencySell)) {
return;
}
const Item_Struct* item = nullptr;
uint32 cost = 0;
uint32 current_currency = GetAlternateCurrencyValue(alt_cur_id);
@@ -12815,7 +12827,7 @@ void Client::Handle_OP_AltCurrencySell(const EQApplicationPacket *app) {
if(!item)
continue;
if(item->ID == inst->GetItem()->ID) {
if(item->ID == inst->GetItem()->ID) {
cost = ml.alt_currency_cost;
found = true;
break;