Mount system Problem

06/03/2017 15:18 united7170#1
Hello guys,

I tried to fix a bug when you teleport and you are riding a mount the mount disapear.
I took another server source and i found this code in char_item.cpp and i added it to my source.

Code:
#ifdef __MOUNT_SYSTEM__
                    case USE_MOUNT:
                    {
                        if (Mount_map_unallowed_find(GetMapIndex()))
                        {
                            ChatPacket(CHAT_TYPE_INFO, "Nu poti folosii mountul in aceasta mapa!");
                            return false;
                        }
                        
                        if ((item->GetWearFlag() & WEARABLE_COSTUME_MOUNT))
                        {
                            if (!item->IsEquipped())
                                EquipItem(item);
                            else
                                UnequipItem(item);
                        }
                        else
                        {
                            if (IsRidingMount())
                            {
                                ChatPacket(CHAT_TYPE_INFO, "Ai un mount chemat deja!");
                                return false;
                            }
                            
                            int mount_effect = item->GetValue(5);
                            if (mount_effect > 0)
                                this->EffectPacket(mount_effect);
                            
                            Mount(item->GetValue(4), false, item->GetValue(0) * 60, item->GetNewAttributeType(0), item->GetNewAttributeValue(0));
                            item->SetCount(item->GetCount() - 1);
                        }                    
                    
                    }
                    break;
#endif

Now the problem is solved, when i teleport the mount does not disappear but:


1. CTRL + G / CTRL + H dosent work. It says "Call your horse first". (for dismount it works)

2. When i have a mount equiped and i try to disequip it by right clicking on mount item, the item goes in inventory but the mount is still active.

[Only registered and activated users can see links. Click Here To Register...]